/* Calma Südfrüchte – Bestellformular */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7f5;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

h1 {
    text-align: center;
    color: #2e7d32;
    margin: 20px 0 4px;
    font-size: 1.6rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin: 0 0 24px;
    font-size: 0.95rem;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    margin: 0 0 16px;
    background: #fff;
}

legend {
    font-weight: 600;
    color: #2e7d32;
    padding: 0 8px;
    font-size: 1rem;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #555;
}

.required {
    color: #d32f2f;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    width: 100%;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

textarea {
    resize: vertical;
    width: 100%;
}

/* ---- Product List ---- */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    border-color: #a5d6a7;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.08);
}

.product-card.selected {
    border-color: #2e7d32;
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.15);
    background: #f9fdf9;
}

.product-card.highlighted {
    border-color: #ef6c00;
    box-shadow: 0 2px 12px rgba(239, 108, 0, 0.15);
}

.product-card.highlighted.selected {
    border-color: #ef6c00;
    box-shadow: 0 2px 12px rgba(239, 108, 0, 0.25);
}

.highlight-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef6c00;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 0 10px 0 8px;
    letter-spacing: 0.02em;
    z-index: 2;
    line-height: 1.2;
}

/* Product image */
.product-image-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.product-image-wrap.no-image {
    display: none;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-count-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ---- Lightbox Gallery ---- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    padding: 4px 10px;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 10001;
    transition: background 0.15s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}

.lightbox-dot.active {
    background: #fff;
}

/* Product body */
.product-body {
    display: flex;
    flex: 1;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
    min-width: 0;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.3;
}

.package-info {
    font-weight: 400;
    color: #888;
    font-size: 0.8rem;
}

.product-description {
    font-style: italic;
    color: #888;
    font-size: 0.8rem;
    line-height: 1.3;
}

.product-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
}

.product-old-price {
    color: #999;
    font-size: 0.82rem;
    text-decoration: line-through;
    white-space: nowrap;
}

.product-price {
    color: #2e7d32;
    font-weight: 800;
    font-size: 1.05rem;
    white-space: nowrap;
}

.product-unit {
    font-size: 0.72rem;
    color: #999;
}

/* Quantity controls */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.15s;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn:hover {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

.qty-btn:active {
    transform: scale(0.92);
}

.qty-input {
    width: 40px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px 2px;
    font-size: 0.95rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Total */
.order-total {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 20px 0 16px;
    color: #2e7d32;
}

/* Submit */
.submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover:not(:disabled) {
    background: #1b5e20;
}

.submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Order hints */
.order-hints {
    margin-top: 12px;
    text-align: center;
    color: #aaa;
    font-size: 0.68rem;
    line-height: 1.3;
}

.order-hints p {
    margin: 0;
}

/* Closed notice */
.closed-notice {
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 48px 24px;
    margin-top: 20px;
}

.closed-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.closed-notice h2 {
    color: #555;
    margin: 0 0 12px;
    font-size: 1.4rem;
}

.closed-notice p {
    color: #888;
    margin: 6px 0;
    font-size: 1rem;
}

.closed-whatsapp-hint {
    margin-top: 20px !important;
    color: #555 !important;
}

.closed-notice .whatsapp-btn {
    margin-top: 12px;
}

/* Success page */
.success-page {
    text-align: center;
    padding-top: 60px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-page h1 {
    margin-bottom: 12px;
}

.success-page p {
    color: #666;
    margin: 8px 0;
}

.back-link {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 24px;
    background: #2e7d32;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.back-link:hover {
    background: #1b5e20;
}

.success-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.whatsapp-btn {
    display: inline-block;
    padding: 14px 28px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.2s;
}

.whatsapp-btn:hover {
    background: #1da851;
}

.success-buttons .back-link {
    margin-top: 0;
}

/* ---- Countdown Bar ---- */
.countdown-bar {
    background: #2e7d32;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background 0.4s;
}

.countdown-bar.countdown-orange {
    background: #ef6c00;
}

.countdown-bar.countdown-red {
    background: #c62828;
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .container {
        padding: 12px 10px 32px;
    }

    .form-row {
        flex-direction: column;
        gap: 8px;
    }

    .product-image-wrap {
        width: 70px;
        height: 70px;
    }

    .product-body {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .product-info {
        flex: 1 1 50%;
    }

    .product-pricing {
        align-items: flex-end;
    }

    .quantity-control {
        width: 100%;
        justify-content: center;
        padding-top: 4px;
    }

    .highlight-badge {
        font-size: 0.6rem;
        padding: 2px 7px;
        right: auto;
        left: 0;
        top: 0;
        border-radius: 10px 0 8px 0;
    }

    .product-old-price {
        font-size: 0.72rem;
    }

    .product-description {
        font-size: 0.72rem;
    }

    h1 {
        font-size: 1.3rem;
    }
}
