/* ========================================
   TIERDENKMAL KONFIGURATOR – Frontend CSS
   ======================================== */

/* Custom Gravur-Schriften */
@font-face {
    font-family: 'PMC Antiqua';
    src: url('../fonts/MaschineAntiqua.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PMC Gotik';
    src: url('../fonts/MaschineGotik.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PMC Pinsel';
    src: url('../fonts/MaschinePinsel.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PMC Stein';
    src: url('../fonts/MaschineStein.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Variables */
:root {
    --pmc-primary: #2c3e50;
    --pmc-accent: #8b6914;
    --pmc-accent-light: #c9a84c;
    --pmc-success: #27ae60;
    --pmc-error: #c0392b;
    --pmc-bg: #f9f9f9;
    --pmc-border: #ddd;
    --pmc-radius: 8px;
    --pmc-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Configurator Container */
.pmc-configurator {
    max-width: 900px;
    margin: 0 auto 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

/* Price Display */
.pmc-price-display {
    background: linear-gradient(135deg, var(--pmc-primary), #34495e);
    color: #fff;
    padding: 20px 30px;
    border-radius: var(--pmc-radius);
    text-align: center;
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pmc-price-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.pmc-price-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--pmc-accent-light);
}

.pmc-price-breakdown {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.9;
}

.pmc-bd-line {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pmc-bd-line:first-child {
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 8px;
    margin-top: 5px;
}

/* Progress Steps */
.pmc-progress {
    margin-bottom: 30px;
    overflow-x: auto;
}

.pmc-progress-steps {
    display: flex;
    gap: 0;
    min-width: max-content;
}

.pmc-progress-step {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #999;
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    cursor: default;
    transition: all 0.3s;
    white-space: nowrap;
}

.pmc-progress-step:first-child {
    border-radius: var(--pmc-radius) 0 0 var(--pmc-radius);
}

.pmc-progress-step:last-child {
    border-radius: 0 var(--pmc-radius) var(--pmc-radius) 0;
    border-right: none;
}

.pmc-progress-step.active {
    background: var(--pmc-primary);
    color: #fff;
    font-weight: 600;
}

.pmc-progress-step.completed {
    background: var(--pmc-success);
    color: #fff;
    cursor: pointer;
}

.pmc-progress-step.completed:hover {
    background: #219a52;
}

/* Steps */
.pmc-step {
    display: none;
    padding: 20px 0;
}

.pmc-step.active {
    display: block;
    animation: gcFadeIn 0.3s ease;
}

@keyframes gcFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pmc-step-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--pmc-primary);
    margin-bottom: 5px;
}

.pmc-step-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.pmc-optional {
    font-weight: 400;
    color: #999;
    font-size: 14px;
}

/* Layout Grid */
.pmc-layout-grid {
    display: grid;
    /* Zeile 1: 4 Spalten (Hochformat), Zeile 2+3: 2 Spalten (Querformat) */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Layouts 5-8 (Zeile 2+3) nehmen je 2 Spalten ein */
.pmc-layout-item:nth-child(n+5) {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .pmc-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pmc-layout-item:nth-child(n+5) {
        grid-column: span 1;
    }
}

.pmc-layout-item {
    position: relative;
    border: 2px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
}

.pmc-layout-item:hover {
    border-color: var(--pmc-primary);
    box-shadow: var(--pmc-shadow);
    transform: translateY(-2px);
}

.pmc-layout-item.selected {
    border-color: var(--pmc-accent);
    background: #fdf8ec;
    box-shadow: 0 0 0 3px rgba(139,105,20,0.15);
}

.pmc-layout-item.selected::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--pmc-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
}

.pmc-layout-item input[type="radio"] {
    display: none;
}

.pmc-layout-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
    object-fit: cover;
}

/* Zeile 1: Hochformat-Bilder — reale Plattenproportionen */
.pmc-layout-item:nth-child(-n+4) img {
    aspect-ratio: 22/35.6;
}

/* Zeile 2+3: Querformat-Bilder — reale Plattenproportionen (gedreht) */
.pmc-layout-item:nth-child(n+5) img {
    aspect-ratio: 35.6/22;
}

.pmc-layout-placeholder {
    width: 100%;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Platzhalter-Proportionen analog Bilder */
.pmc-layout-item:nth-child(-n+4) .pmc-layout-placeholder {
    aspect-ratio: 22/35.6;
}
.pmc-layout-item:nth-child(n+5) .pmc-layout-placeholder {
    aspect-ratio: 35.6/22;
}

.pmc-placeholder-nr {
    font-size: 32px;
    font-weight: bold;
    color: #bbb;
}

.pmc-layout-name {
    font-size: 12px;
    color: #555;
    display: block;
}

/* Option Cards (Material, Size, Engraving, etc.) */
.pmc-material-grid,
.pmc-size-grid,
.pmc-engraving-options,
.pmc-symbol-grid,
.pmc-font-grid,
.pmc-finish-options {
    display: grid;
    gap: 12px;
}

.pmc-material-grid { grid-template-columns: repeat(2, 1fr); }
.pmc-size-grid { grid-template-columns: repeat(3, 1fr); }
.pmc-engraving-options { grid-template-columns: repeat(2, 1fr); }
.pmc-symbol-grid { grid-template-columns: repeat(3, 1fr); }
.pmc-font-grid { grid-template-columns: repeat(2, 1fr); }
.pmc-finish-options { grid-template-columns: 1fr; }

@media (max-width: 600px) {
    .pmc-material-grid,
    .pmc-engraving-options,
    .pmc-font-grid { grid-template-columns: 1fr; }
    .pmc-size-grid { grid-template-columns: 1fr; }
    .pmc-symbol-grid { grid-template-columns: repeat(2, 1fr); }
}

.pmc-option-card {
    display: block;
    border: 2px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.pmc-option-card:hover {
    border-color: var(--pmc-primary);
    box-shadow: var(--pmc-shadow);
}

.pmc-option-card.selected {
    border-color: var(--pmc-accent);
    background: #fdf8ec;
}

.pmc-option-card input[type="radio"] {
    display: none;
}

.pmc-option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pmc-option-content strong {
    font-size: 15px;
    color: var(--pmc-primary);
}

.pmc-option-price {
    font-size: 14px;
    color: var(--pmc-accent);
    font-weight: 600;
}

.pmc-option-note {
    font-size: 12px;
    color: #888;
}

.pmc-option-small {
    padding: 10px;
}

.pmc-option-small .pmc-option-content,
.pmc-option-small {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* Material Swatch */
.pmc-material-swatch {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

/* Symbol */
.pmc-symbol-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 5px;
}

.pmc-symbol-img {
    max-width: 50px;
    height: auto;
    margin-bottom: 5px;
}

/* Font Preview */
.pmc-font-preview {
    font-size: 20px;
    display: block;
    margin-bottom: 5px;
    color: #333;
}

/* Text Input */
.pmc-text-section {
    margin-bottom: 25px;
}

.pmc-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--pmc-primary);
    display: block;
    margin-bottom: 8px;
}

.pmc-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.2s;
    font-family: inherit;
}

.pmc-textarea:focus {
    border-color: var(--pmc-accent);
    outline: none;
}

.pmc-char-count {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Preview */
.pmc-preview-box {
    background: #1a1a1a;
    color: #d4a952;
    min-height: 140px;
    border-radius: var(--pmc-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
    /* background-size: auto 200% !important; OLD - RMV */
	background-size: cover;	
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
    transition: background-image 0.4s ease, color 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.pmc-preview-box > * {
    position: relative;
    z-index: 1;
}

.pmc-preview-placeholder {
    opacity: 0.5;
    font-style: italic;
    color: #ccc;
}

/* Veredelungs-Farben als Preview-Textfarben */
.pmc-preview-box.pmc-finish-none      { color: #d4a952; }
.pmc-preview-box.pmc-finish-lack      { /* wird per JS dynamisch gesetzt */ }
.pmc-preview-box.pmc-finish-silber    { color: #c0c0c0; text-shadow: 0 0 8px rgba(192,192,192,0.5); }
.pmc-preview-box.pmc-finish-blattgold { color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,0.4); }
.pmc-preview-box.pmc-finish-blattgold_umrandet {
    color: #ffd700;
    /* text-shadow: 0 0 10px rgba(255,215,0,0.4); */
    -webkit-text-stroke: 1.5px #1a1a1a;
}

/* Symbol-Veredelung: eigene Farbe, verhindert Vererbung vom Text-Finish */
.pmc-preview-symbol {
    color: #ffffff;
    text-shadow: none;
    -webkit-text-stroke: 0;
}
.pmc-preview-symbol.pmc-sym-finish-lack      { /* Farbe per JS inline */ }
.pmc-preview-symbol.pmc-sym-finish-silber    { color: #c0c0c0; text-shadow: 0 0 8px rgba(192,192,192,0.5); }
.pmc-preview-symbol.pmc-sym-finish-blattgold { color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,0.4); }
.pmc-preview-symbol.pmc-sym-finish-blattgold_umrandet {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.4);
    -webkit-text-stroke: 1.5px #1a1a1a;
}

/* Lack Colors — jetzt eigenständiges Element außerhalb des Labels */
#pmc-lack-colors-wrapper {
    background: #fafafa;
    border: 2px solid var(--pmc-accent-light);
    border-radius: var(--pmc-radius);
    padding: 15px 20px;
    margin: 5px 0 10px;
}

.pmc-lack-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--pmc-primary);
}

#pmc-lack-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pmc-lack-color-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    border: 2px solid transparent;
    border-radius: 20px;
    transition: all 0.2s;
    background: #fff;
}

.pmc-lack-color-item:hover {
    border-color: var(--pmc-border);
}

.pmc-lack-color-item.selected {
    border-color: var(--pmc-accent);
    background: #fdf8ec;
}

.pmc-lack-color-item input[type="radio"] {
    display: none;
}

.pmc-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
    flex-shrink: 0;
}

.pmc-lack-color-item.selected .pmc-color-dot,
.pmc-lack-color-item input:checked ~ .pmc-color-dot {
    box-shadow: 0 0 0 3px rgba(139,105,20,0.3);
    border-color: var(--pmc-accent);
}

/* Symbol Size Grid */
.pmc-symbol-size-grid,
.pmc-symbol-position-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .pmc-symbol-size-grid,
    .pmc-symbol-position-grid {
        grid-template-columns: 1fr;
    }
}

.pmc-symbol-size-item.pmc-recommended,
.pmc-symbol-pos-item.selected {
    border-color: var(--pmc-accent-light);
}

.pmc-badge-recommended {
    display: inline-block;
    background: var(--pmc-accent);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 5px;
}

/* Material Image */
.pmc-material-img {
    width: 100%;
    max-width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

/* Symbol lack wrapper (same as text lack wrapper) */
#pmc-symbol-lack-wrapper {
    background: #fafafa;
    border: 2px solid var(--pmc-accent-light);
    border-radius: var(--pmc-radius);
    padding: 15px 20px;
    margin: 5px 0 10px;
}

#pmc-symbol-lack-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Helper: muted text */
.pmc-muted {
    color: #aaa;
    font-size: 11px;
}

/* Symbol Finish Options */
.pmc-symbol-finish-options {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Navigation */
.pmc-navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #eee;
}

.pmc-btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--pmc-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pmc-btn-prev {
    background: #eee;
    color: #555;
}

.pmc-btn-prev:hover {
    background: #ddd;
}

.pmc-btn-next {
    background: var(--pmc-primary);
    color: #fff;
    margin-left: auto;
}

.pmc-btn-next:hover {
    background: #1a252f;
}

.pmc-btn-finish {
    background: var(--pmc-success) !important;
}

.pmc-btn-finish:hover {
    background: #219a52 !important;
}

/* Eigener Warenkorb-Button */
.pmc-cart-button-section {
    margin: 20px 0;
    text-align: center;
}

.pmc-btn-cart {
    background: var(--pmc-success, #27ae60);
    color: #fff;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: var(--pmc-radius);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 500px;
}

.pmc-btn-cart:hover:not(:disabled) {
    background: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.3);
}

.pmc-btn-cart:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

/* Error */
.pmc-error-msg {
    background: var(--pmc-error);
    color: #fff;
    padding: 10px 15px;
    border-radius: var(--pmc-radius);
    margin: 15px 0;
    font-weight: 500;
    animation: gcFadeIn 0.2s;
    scroll-margin-top: 20vh;
}

/* Summary */
.pmc-summary-overlay {
    background: #fff;
    border: 2px solid var(--pmc-accent);
    border-radius: var(--pmc-radius);
    padding: 25px;
}

.pmc-summary-grid {
    margin: 20px 0;
}

.pmc-summary-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pmc-summary-label {
    font-weight: 600;
    color: var(--pmc-primary);
    min-width: 160px;
}

.pmc-summary-value {
    color: #333;
}

.pmc-summary-note {
    background: #f0f8e8;
    padding: 12px 15px;
    border-radius: var(--pmc-radius);
    color: #2d6a0f;
    font-size: 14px;
    margin: 15px 0;
}

/* Price placeholder on product page */
.pmc-price-placeholder {
    font-size: 14px;
    color: #999;
    font-style: italic;
}

/* Size dimension label */
.pmc-size-dim {
    font-size: 12px;
    color: #888;
}

/* === Name-Datum-Blöcke (Schritt 6) === */

.pmc-field-group {
    margin-bottom: 20px;
}

.pmc-text-field {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.pmc-text-field:focus {
    border-color: var(--pmc-accent);
    outline: none;
}

.pmc-name-block {
    background: var(--pmc-bg);
    border: 1px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    padding: 15px;
    margin-bottom: 12px;
}

.pmc-name-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pmc-name-field,
.pmc-datum-field {
    margin-bottom: 8px;
}

.pmc-name-field label,
.pmc-datum-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.pmc-char-info {
    font-size: 12px;
    color: #999;
    text-align: right;
    margin-top: 2px;
}

.pmc-btn-remove-name {
    background: none;
    border: 1px solid var(--pmc-error);
    color: var(--pmc-error);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.pmc-btn-remove-name:hover {
    background: var(--pmc-error);
    color: #fff;
}

.pmc-btn-add-name {
    background: var(--pmc-bg);
    border: 2px dashed var(--pmc-accent);
    color: var(--pmc-accent);
    padding: 10px 20px;
    border-radius: var(--pmc-radius);
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s;
}

.pmc-btn-add-name:hover:not(:disabled) {
    background: #fdf8ec;
}

.pmc-btn-add-name:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-style: solid;
}

.pmc-name-limit-info {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

.pmc-text-summary {
    background: var(--pmc-bg);
    border: 1px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    padding: 12px 15px;
    margin: 15px 0;
}

/* Deaktivierter Schritt in Fortschrittsanzeige */
.pmc-progress-step.pmc-step-disabled {
    opacity: 0.35;
    text-decoration: line-through;
    pointer-events: none;
}

/* Foto-Optionen */
.pmc-foto-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.pmc-foto-size,
.pmc-foto-frame {
    flex: 1;
    min-width: 200px;
}

.pmc-foto-frame-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* Foto Upload */
.pmc-foto-upload-area { margin: 10px 0; }
.pmc-file-input { width: 100%; padding: 10px; border: 2px dashed var(--pmc-border); border-radius: var(--pmc-radius); background: var(--pmc-bg); cursor: pointer; }
.pmc-file-input:hover { border-color: var(--pmc-accent); }
.pmc-foto-preview-thumb { margin-top: 8px; }

/* === Schritt 8: Bestätigung === */

.pmc-final-preview-section {
    margin-bottom: 25px;
}

.pmc-final-preview-section .pmc-preview-box {
    max-width: 500px;
    margin: 0 auto;
}

.pmc-final-summary {
    background: var(--pmc-bg);
    border: 1px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    padding: 20px 25px;
    margin-bottom: 25px;
}

.pmc-confirmation-section {
    background: #fff8e1;
    border: 2px solid #f9a825;
    border-radius: var(--pmc-radius);
    padding: 20px 25px;
    margin-bottom: 20px;
}

.pmc-confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.5;
}

.pmc-confirm-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--pmc-success);
    cursor: pointer;
}

.pmc-confirm-text {
    font-weight: 600;
    color: var(--pmc-primary);
}

/* Warenkorb-Button nur aktiv nach Bestätigung */
button.single_add_to_cart_button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

button.single_add_to_cart_button.pmc-confirmed-active {
    opacity: 1;
    background: var(--pmc-success) !important;
    border-color: var(--pmc-success) !important;
    cursor: pointer;
}
