/* Shared CSS for all pages */

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Card & Layout */
.main-container {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
    .main-container {
        min-height: auto;
        margin: 40px auto;
        border-radius: 24px;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    body {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        padding-bottom: 40px;
    }
}

/* Flash Sale Card & Sheet */
.sheet-backdrop {
    opacity: 0;
    transition: opacity .18s ease;
}

.sheet-panel {
    transform: translateY(14px);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
}

.sheet-open .sheet-backdrop {
    opacity: 1;
}

.sheet-open .sheet-panel {
    transform: translateY(0);
    opacity: 1;
}

.no-bounce {
    overscroll-behavior: contain;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Glassmorphism Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.modern-input, .modern-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background: #F5F5F7;
    color: var(--text-main);
}

.modern-input:focus, .modern-select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Package Selection Cards */
.package-card {
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.package-card.selected {
    border-color: var(--primary);
    background: var(--bg-selection, #F0F7FF);
}

.package-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #C7C7CC;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.package-card.selected .package-check {
    background: var(--primary);
    border-color: var(--primary);
}

.package-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.package-card.selected .package-check::after {
    opacity: 1;
    transform: scale(1);
}

/* Payment List - Compact Vertical for Mobile */
.payment-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-category-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    margin-bottom: 4px;
    padding-left: 4px;
}

.payment-category-label:first-child {
    margin-top: 0;
}

.payment-option {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    background: white;
    position: relative;
    min-height: 48px;
}

.payment-option:active {
    transform: scale(0.98);
}

.payment-option.selected {
    border-color: var(--primary);
    background: var(--bg-payment-selected, linear-gradient(135deg, #FEF2F2 0%, #FFF5F5 100%));
    box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.12);
}

.payment-logo-wrapper {
    width: 48px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #FAFAFA;
    border-radius: 6px;
    padding: 4px;
}

.payment-option.selected .payment-logo-wrapper {
    background: white;
}

.payment-option img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.payment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1;
}

.payment-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    background: white;
}

.payment-option.selected .payment-check {
    background: var(--primary);
    border-color: var(--primary);
}

.payment-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.payment-option.selected .payment-check::after {
    opacity: 1;
    transform: scale(1);
}

/* Tablet and Desktop - Keep vertical but wider */
@media (min-width: 640px) {
    .payment-option {
        padding: 14px 16px;
    }

    .payment-logo-wrapper {
        width: 64px;
        height: 36px;
    }

    .payment-name {
        font-size: 15px;
    }

    .payment-desc {
        font-size: 12px;
    }
}

/* Checkout Button */
.btn-checkout {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-checkout:active {
    transform: scale(0.98);
}

.btn-checkout:disabled {
    background: #B0B0B5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Features List */
.feature-item {
    display: flex;
    align-items: start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
}

.feature-icon {
    color: var(--success);
    margin-top: 3px;
}

/* Notification Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: max-content;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Testimonial Carousel (Marquee) */
.testimonial-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.testimonial-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: marquee 120s linear infinite;
    padding: 4px 0;
}

.testimonial-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.testimonial-item {
    flex-shrink: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    cursor: default;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.testimonial-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.t-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.t-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--avatar-bg, linear-gradient(135deg, #FFD1D1 0%, #FFE4E4 100%));
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.t-review-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
}

.t-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

.t-stars {
    color: #FFB400;
    font-size: 10px;
    line-height: 1;
}

.t-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    padding: 16px 0;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.2s;
    font-size: 12px;
    color: var(--text-secondary);
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-content {
    padding-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

/* Details Modal (Bottom Sheet style) */
#detailsModal {
    align-items: flex-end;
}

#detailsModal .modal-box {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#detailsModal.active .modal-box {
    transform: translateY(0);
}

/* Payment Instruction Styles */
.instruction-step {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.copy-btn {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Scrollbar (from Kurmer) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
