/* ===================================
   Gift Packages Section
   Preispakete mit Premium-Design
   =================================== */

.gift-packages {
    padding: 80px 0 56px 0; /* kompakter, aber genug Platz für Schatten */
    background: white;
    position: relative;
}

.gift-packages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0; /* Linie entfernen */
    background: none;
}

/* Section Header */
.gift-packages .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.gift-packages .section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #2a0000;
    margin-bottom: 16px;
}

.gift-packages .section-subtitle {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 12px; /* minimaler Unterabstand */
    overflow: visible; /* Badge darf über Container hinausragen */
}

/* Package Card */
.package-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px 50px 30px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); /* Einheitlicher Schatten */
    position: relative;
    overflow: visible;
    transition: all 0.4s ease;
    min-width: 0; /* verhindert, dass Inhalt die Karte horizontal sprengt */
    overflow-wrap: anywhere;
}

.package-card:hover {
    transform: none;
    box-shadow: inherit;
}

/* Featured Package */
.package-card.featured {
    background: linear-gradient(135deg, #610000 0%, #8b0000 100%);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); /* Gleicher Schatten wie normale Karten */
    overflow: visible;
}

.package-card.featured:hover {
    transform: none;
    box-shadow: inherit;
}

/* Package Badge */
.package-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translate(-50%, -100%);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #610000;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Package Header */
.package-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.featured .package-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.package-name {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2a0000;
}

.featured .package-name {
    color: white;
}

.package-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price-from {
    font-size: 14px;
    color: #999;
}

.featured .price-from {
    color: rgba(255, 255, 255, 0.7);
}

.price-amount {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #610000 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured .price-amount {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Package Description */
.package-description {
    margin-bottom: 30px;
    text-align: center;
}

.package-description p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

.featured .package-description p {
    color: rgba(255, 255, 255, 0.9);
}

/* Package Features */
.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
    color: #444;
}

.featured .package-features li {
    color: rgba(255, 255, 255, 0.95);
}

.package-features svg {
    width: 20px;
    height: 20px;
    stroke: #4CAF50;
    flex-shrink: 0;
}

.featured .package-features svg {
    stroke: #FFD700;
}

/* Package Disclaimer */
.package-disclaimer {
    margin: 16px 0 8px 0;
    text-align: center;
}

.package-disclaimer small {
    font-size: 12px;
    color: #999;
    font-style: italic;
    line-height: 1.3;
}

.featured .package-disclaimer small {
    color: rgba(255, 255, 255, 0.7);
}

/* Package CTA */
.package-cta {
    margin-top: auto;
}

.btn-select-package {
    width: 100%;
    padding: 16px 24px;
    background: transparent;
    border: 2px solid #610000;
    border-radius: 50px;
    color: #610000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-package:hover {
    background: #610000;
    color: white;
    box-shadow: 0 10px 30px rgba(97, 0, 0, 0.2);
}

.btn-select-package.featured {
    background: white;
    color: #610000;
    border-color: white;
}

.btn-select-package.featured:hover {
    background: #FFD700;
    border-color: #FFD700;
    color: #610000;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* Inline Checkout (expanded card) */
.package-card.expanded {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); /* Einheitlich auch im Expanded-State */
}

.package-checkout {
    display: none;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,0.08);
    max-width: 100%;
}

.package-card.expanded .package-checkout {
    display: block;
}

.checkout-embed {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    background: #fff;
    max-width: 100%;
}

.voucher-iframe {
    width: 100%;
    height: 640px;
    border: 0;
    display: block;
}

.checkout-close {
    margin-top: 12px;
    background: none;
    border: none;
    color: #610000;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

/* Inline checkout form elements */
.inline-checkout-form { display: grid; gap: 16px; }
.inline-checkout-form { width: 100%; }
.checkout-fields { display: grid; gap: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-checkout-form, .checkout-fields, .field-row, .field { max-width: 100%; min-width: 0; }
.checkout-legal a { color: #610000; text-decoration: underline; }
.checkout-legal a:hover,
.checkout-legal a:focus { color: #8b0000; }
.field label { display: block; font-weight: 600; color: #2a0000; margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"] {
    width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 12px; font-size: 16px;
}
.field input[type="text"]:focus,
.field input[type="email"]:focus {
    border-color: #610000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(97,0,0,0.15);
}
.chk-dse {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    color: #444;
    max-width: 100%;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.chk-dse input[type="checkbox"] {
    margin: 2px 0 0 0;
    align-self: start;
}
.chk-dse span { display: block; }
.chk-dse, .chk-dse * { white-space: normal; overflow-wrap: anywhere; }
.chk-dse a { color: #610000; font-weight: 600; text-decoration: underline; }
.payment-slot { padding: 0; border: 0; border-radius: 0; background: transparent; width: 100%; max-width: 100%; overflow: visible; }
.payment-slot [id^="payment-element-"] { width: 100%; max-width: 100%; }
.StripeElement, .__PrivateStripeElement { width: 100% !important; min-width: 0 !important; }
.checkout-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; max-width: 100%; }
.checkout-status { margin-left: auto; font-size: 14px; font-weight: 600; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.btn-pay-now {
    padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 800; font-size: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #610000; box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}
.btn-pay-now:disabled { filter: grayscale(0.2) brightness(0.9); cursor: not-allowed; opacity: 0.7; }
.checkout-status { margin-left: auto; font-size: 14px; font-weight: 600; }

/* Better contrast for featured (red) card checkout */
.package-card.featured .package-checkout { border-top-color: rgba(255,255,255,0.25); }
.package-card.featured .field label,
.package-card.featured .chk-dse,
.package-card.featured .checkout-status,
.package-card.featured .package-disclaimer small { color: #ffffff; }
.package-card.featured .chk-dse a { color: #FFD700; }
.package-card.featured .checkout-legal a { color: #FFD700; }
.package-card.featured .checkout-legal a:hover,
.package-card.featured .checkout-legal a:focus { color: #ffeb8a; }
.package-card.featured .field input[type="text"],
.package-card.featured .field input[type="email"] {
    background: #ffffff;
    color: #2a0000;
    border-color: rgba(255,255,255,0.6);
}
.package-card.featured .field input::placeholder { color: #7a0000; opacity: 0.8; }
.package-card.featured .field input[type="text"]:focus,
.package-card.featured .field input[type="email"]:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
.package-card.featured .checkout-close { color: #ffffff; }

/* Prevent iOS Safari zoom on focus by ensuring >=16px font-size */
.inline-checkout-form input,
.inline-checkout-form select,
.inline-checkout-form textarea { font-size: 16px; }

@media (max-width: 768px) {
    .field-row { grid-template-columns: 1fr; }
    .checkout-actions { flex-direction: column; align-items: stretch; }
    .checkout-status { margin-left: 0; }
}

/* Custom Amount (minimalistisch) */
.custom-amount-controls { display: grid; gap: 16px; margin-top: 10px; }
.custom-package { max-width: 720px; margin: 0 auto; }

/* Inline minimal variant */
.custom-value-inline {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.link-custom-amount {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(97, 0, 0, 0.92) 0%, #610000 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(97, 0, 0, 0.28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.link-custom-amount:hover,
.link-custom-amount:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(97, 0, 0, 0.32);
    background: linear-gradient(135deg, #7a0000 0%, #610000 100%);
}
.link-custom-amount:focus-visible {
    outline: 3px solid rgba(97, 0, 0, 0.35);
    outline-offset: 3px;
}
.link-custom-amount .btn-label {
    font-size: 16px;
    letter-spacing: 0.3px;
}
.custom-value-inline .inline-hint {
    background: linear-gradient(135deg, rgba(97, 0, 0, 0.08) 0%, rgba(97, 0, 0, 0.04) 100%);
    color: #610000;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(97, 0, 0, 0.12);
    letter-spacing: 0.25px;
}
.btn-step {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid #ddd; background: #fff; color: #2a0000;
    font-size: 18px; font-weight: 700; cursor: pointer;
    transition: all .2s ease;
}
.btn-step:hover { border-color: #610000; color: #610000; background: #fdf3f3; }
.custom-inline-form .inline-label { color: #2a0000; font-weight: 600; }
.custom-inline-form input, .modal-stepper input {
    width: 120px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
}
.custom-value-inline .currency, .modal-stepper .currency { margin-left: 6px; color: #610000; font-weight: 800; }
.custom-value-inline .btn-select-package { padding: 12px 20px; }

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; overflow-y: auto; overflow-x: hidden; padding: 16px; }
.modal.active { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-dialog { position: relative; background: #fff; border-radius: 20px; width: min(560px, calc(100vw - 32px)); padding: 24px clamp(24px, 5vw, 32px); box-shadow: 0 20px 80px rgba(0,0,0,0.25); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 26px; color: #2a0000; margin: 0 0 6px; }
.modal-header p { color: #666; margin: 0 0 16px; }
.modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-stepper { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 20px; }
.modal-cta { display: flex; justify-content: center; }

/* Slider */
#custom-amount-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 999px;
    outline: none;
}
#custom-amount-range::-webkit-slider-runnable-track { height: 6px; background: #eee; border-radius: 999px; }
#custom-amount-range::-moz-range-track { height: 6px; background: #eee; border-radius: 999px; }
#custom-amount-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #610000;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(97,0,0,0.25);
    margin-top: -6px; /* vertikal mittig über 6px Track */
}
#custom-amount-range::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #610000; border: none; cursor: pointer;
}

/* Quick amount chips */
.quick-amounts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip-amount {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: white;
    color: #2a0000;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.chip-amount:hover, .chip-amount.active {
    border-color: #610000;
    background: #fdf3f3;
}

/* Inline input */
.custom-amount-input { display: flex; align-items: center; justify-content: center; gap: 8px; }
.custom-amount-input { margin-bottom: 12px; }
.custom-package .package-cta { margin-top: 12px; }
.custom-amount-input .currency { margin-left: 6px; }

/* Visually hidden label for accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
.custom-amount-input input {
    width: 120px; text-align: center;
    padding: 12px 14px; border: 1px solid #ddd; border-radius: 12px; font-weight: 700;
}
.custom-amount-input .currency { font-weight: 800; color: #610000; }

/* CTA alignment reuse of .package-cta styles */

/* Responsive Design */
@media (max-width: 1024px) {
    .packages-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 60px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .package-card,
    .package-card.featured,
    .package-card:hover,
    .package-card.featured:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .gift-packages {
        padding: 60px 0 72px 0; /* mobil kompakter */
    }
    
    .packages-grid {
        padding: 0 20px 20px; /* mobiler Unterabstand reduziert */
    }

    /* Zusätzlicher Abstand gezielt für die letzte/200€ Karte */
    .packages-grid > .package-card:last-child,
    .package-card[data-package="exclusive"] {
        margin-bottom: 24px;
    }
    
    .package-card {
        padding: 30px 20px 40px 20px;
    }
    
    .package-name {
        font-size: 24px;
    }
    
    .price-amount {
        font-size: 36px;
    }
    
    .custom-value-card {
        padding: 32px 24px;
        margin: 0 20px;
        max-width: none;
    }
    
    .custom-value-input {
        flex-direction: column;
        gap: 16px;
    }
    
    .custom-value-input input {
        width: 100%;
    }
    
    .btn-custom-value {
        width: 100%;
    }

	/* Prevent badge text from wrapping on mobile */
	.package-badge {
		white-space: nowrap;
	}
}
