/* =====================================================
   Húsvéti Rendelés Plugin – Frontend Stílusok
   ===================================================== */

:root {
    --h-primary: #000000;
    --h-primary-dark: #000000;
    --h-accent: #f0a500;
    --h-accent-light: #dbdad9;
    --h-success: #2e7d32;
    --h-success-light: #e8f5e9;
    --h-text: #2c2c2c;
    --h-muted: #666;
    --h-border: #e8e8e8;
    --h-radius: 14px;
    --h-shadow: 0 4px 20px rgba(0,0,0,.08);
    --h-shadow-hover: 0 8px 32px rgba(224,123,0,.22);
    --h-transition: 0.22s cubic-bezier(.4,0,.2,1);
}

/* WRAPPER */
.husveti-wrapper {
    max-width: 860px;
    margin: 0 auto 60px;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--h-text);
}

/* HEADER */
.husveti-header {
    text-align: center;
    padding: 48px 0 36px;
}

.husveti-title {
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 800;
    color: var(--h-primary);
    margin: 0 0 10px;
    line-height: 1.15;
}
.husveti-subtitle {
    font-size: 16px;
    color: var(--h-muted);
    margin: 0;
}

/* STEP INDICATOR */
.husveti-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 8px 4px 4px;
}
.husveti-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}
.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--h-border);
    color: #aaa;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--h-transition), color var(--h-transition), transform var(--h-transition);
}
.step-label {
    font-size: 11px;
    color: #aaa;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--h-transition);
}
.husveti-step.active .step-num {
    background: var(--h-primary);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(224,123,0,.35);
}
.husveti-step.active .step-label { color: var(--h-primary); font-weight: 700; }
.husveti-step.done .step-num {
    background: var(--h-success);
    color: #fff;
}
.husveti-step.done .step-num::after { content: '✓'; }
.husveti-step-line {
    flex: 1;
    height: 2px;
    background: var(--h-border);
    min-width: 24px;
    max-width: 60px;
    margin-bottom: 22px;
    transition: background var(--h-transition);
}
.husveti-step-line.done { background: var(--h-success); }

/* SECTIONS */
.husveti-section { display: none; }
.husveti-section.active { display: block; animation: fadeSlide .32s ease; }
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--h-text);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.optional-badge {
    font-size: 12px;
    background: #f0f0f0;
    color: #777;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* CARDS GRID */
.husveti-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    overflow: visible !important;
}

/* CARD ITEM */
.husveti-card-item {
    position: relative;
    background: #fff;
    border: 2px solid var(--h-border);
    border-radius: var(--h-radius);
    padding: 20px 16px 16px;
    transition: border-color var(--h-transition), box-shadow var(--h-transition);
    text-align: center;
    user-select: none;
    overflow: visible !important;
}
.husveti-card-item:hover {
    border-color: var(--h-accent);
}
.husveti-card-item.has-qty {
    border-color: var(--h-primary);
    background: var(--h-accent-light);
    box-shadow: var(--h-shadow-hover);
}
.husveti-card-item.skip-card {
    border-style: dashed;
    background: #fafafa;
}


.card-name { font-weight: 700; font-size: 14px; color: var(--h-text); margin-bottom: 6px; line-height: 1.3; }
.card-desc { font-size: 12px; color: var(--h-muted); margin-bottom: 10px; line-height: 1.4; }
.card-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--h-primary);
    margin-top: auto;
}
.card-check {
    display: block;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height var(--h-transition), opacity var(--h-transition), padding var(--h-transition);
    text-align: center;
}
.card-check::after {
    content: 'Kiválasztva';
    display: inline-block;
    background: #2e7d32;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
}
.husveti-card-item.skip-card.selected .card-check::after {
    background: var(--h-success);
}
.husveti-card-item.selected .card-check {
    height: auto;
    min-height: 28px;
    opacity: 1;
    padding-top: 10px;
    overflow: visible;
}

/* NAVIGATION */
.husveti-nav {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* BUTTONS */
.husveti-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 26px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--h-transition), transform var(--h-transition), box-shadow var(--h-transition), opacity var(--h-transition);
    text-decoration: none;
    font-family: inherit;
}
.husveti-btn-next {
    background: linear-gradient(135deg, var(--h-primary), var(--h-primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(224,123,0,.3);
}
.husveti-btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224,123,0,.4);
}
.husveti-btn-next:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .65;
}
.husveti-btn-prev {
    background: #f4f4f4;
    color: var(--h-muted);
}
.husveti-btn-prev:hover { background: #e8e8e8; }
.husveti-btn-submit {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    padding: 16px 32px;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(46,125,50,.3);
}
.husveti-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,125,50,.4); }

/* ORDER SUMMARY */
.husveti-order-summary {
    background: var(--h-accent-light);
    border: 1px solid #ffe08a;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
}
.husveti-order-summary h3 { margin: 0 0 12px; font-size: 16px; color: var(--h-primary); }
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #f0d080;
    font-size: 14px;
    color: var(--h-text);
}
.summary-row:last-child { border-bottom: none; }
.summary-row:empty { display: none; }
.summary-price { font-weight: 700; color: var(--h-primary); white-space: nowrap; }

/* FORM FIELDS */
.husveti-form-fields { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 14px; font-weight: 600; color: var(--h-text); }
.form-row input,
.form-row select,
.form-row textarea {
    padding: 12px 14px;
    border: 2px solid var(--h-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--h-text);
    background: #fff;
    transition: border-color var(--h-transition), box-shadow var(--h-transition);
    width: 100%;
    box-sizing: border-box;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--h-accent);
    box-shadow: 0 0 0 3px rgba(240,165,0,.15);
}

/* TOTAL BAR */
.husveti-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--h-primary), var(--h-primary-dark));
    color: #fff;
    border-radius: 12px;
    padding: 18px 24px;
    margin: 24px 0;
    font-weight: 700;
}
.total-label { font-size: 16px; }
.total-price { font-size: 28px; font-weight: 900; }

/* EXTRA INFO */
.husveti-extra-info {
    background: #f8f8f8;
    border-left: 4px solid var(--h-accent);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    color: var(--h-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* MESSAGES */
.husveti-message {
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 16px;
}
.husveti-message.error { background: #fdecea; color: #c62828; border: 1px solid #f44336; }
.husveti-message.success { background: var(--h-success-light); color: var(--h-success); border: 1px solid #66bb6a; }

/* SUCCESS STATE */
.husveti-success {
    text-align: center;
    padding: 48px 24px;
    background: var(--h-success-light);
    border-radius: var(--h-radius);
    border: 2px solid #a5d6a7;
}
.success-icon { display: none; }
.husveti-success h2 { font-size: 28px; color: var(--h-success); margin: 0 0 12px; }
.husveti-success p { color: #555; font-size: 16px; margin-bottom: 16px; }
.success-detail {
    background: #fff;
    border-radius: 10px;
    padding: 16px 24px;
    margin: 20px auto;
    max-width: 400px;
    text-align: left;
    font-size: 14px;
    color: var(--h-text);
    line-height: 1.8;
    border: 1px solid #c8e6c9;
}

/* CLOSED STATE */
.husveti-closed {
    text-align: center;
    padding: 64px 24px;
    background: #fafafa;
    border-radius: var(--h-radius);
    border: 2px dashed #ddd;
}
.husveti-closed-icon { font-size: 56px; display: block; margin-bottom: 16px; }
.husveti-closed h2 { color: var(--h-muted); font-size: 24px; }
.husveti-closed p { color: #999; }

/* QUANTITY STEPPER */
.card-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.qty-btn {
    background: #fff;
    border: 1.5px solid var(--h-border);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    color: var(--h-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--h-transition), background var(--h-transition), color var(--h-transition);
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}
.qty-btn:hover {
    border-color: var(--h-primary);
    color: var(--h-primary);
    background: var(--h-accent-light);
}
.qty-btn:active {
    background: var(--h-accent);
    color: #fff;
    border-color: var(--h-accent);
}
.qty-btn.qty-minus:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}
.qty-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--h-text);
    min-width: 36px;
    text-align: center;
}
.husveti-card-item.has-qty .qty-val {
    color: var(--h-primary);
}
.husveti-card-item.has-qty .qty-btn {
    border-color: var(--h-primary);
    color: var(--h-primary);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .husveti-cards { grid-template-columns: 1fr 1fr; }
    .husveti-nav { justify-content: space-between; }
    .total-price { font-size: 22px; }
    .husveti-steps { gap: 0; }
    .step-label { font-size: 10px; }
}
@media (max-width: 400px) {
    .husveti-cards { grid-template-columns: 1fr; }
}
