/* ========================================
   IMPROVED CHECKOUT PAGE STYLES
   Modern, Clean, Professional Design
   ======================================== */

/* Navigation Bar - Stylish & Modern */
.navbar-service {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(27, 27, 27, 0.85);
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.5), transparent);
    opacity: 0.5;
}

/* --- NAV BAR MINIMAL 2025 --- */
.nav-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Great Vibes', 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 400;
    text-decoration: none;
    color: #ffffff;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 50%, #1e3a8a 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(30, 58, 138, 0.3));
}

.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3a8a, rgba(255, 255, 255, 0.8));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(30, 58, 138, 0.6);
}

.nav-logo:hover {
    background-position: 100% center;
    filter: drop-shadow(0 4px 12px rgba(30, 58, 138, 0.5));
    transform: scale(1.05) translateY(-1px);
}

.nav-logo:hover::after {
    width: 100%;
}

.nav-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6), rgba(255, 255, 255, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-menu a:hover {
    color: #ffffff;
    background: rgba(30, 58, 138, 0.2);
    border-color: rgba(30, 58, 138, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4),
                0 0 0 1px rgba(30, 58, 138, 0.2);
}

.nav-menu a:hover::before {
    left: 100%;
}

.nav-menu a:hover::after {
    opacity: 1;
}

.nav-menu a:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.3);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .nav-container {
        padding: 14px 16px;
    }
    
    .nav-menu {
        gap: 8px;
    }

    .nav-logo {
        font-size: 1.5rem;
    }
    
    .nav-menu a {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Main Layout */
.checkout-main {
    padding: 3rem 0 5rem;
    min-height: calc(100vh - 200px);
    padding-top: calc(120px + env(safe-area-inset-top));
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.95) 0%, rgba(30, 30, 40, 0.98) 100%);
    position: relative;
}

.checkout-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.checkout-main .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Page Title */
.checkout-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Empty Cart Warning */
.cart-empty-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: slideIn 0.4s ease-out;
}

.cart-empty-warning p {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0;
}

.cart-empty-warning a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cart-empty-warning a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Checkout Grid Layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2.5rem;
    align-items: start;
}

/* Form Section */
.checkout-form-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s;
}

.checkout-form-section:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.form-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    letter-spacing: -0.01em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 2px;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.required {
    color: #ef4444;
    margin-left: 2px;
}

/* Form Inputs */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 48px;
}

/* Error Messages */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 22px;
    font-weight: 500;
    animation: shake 0.3s ease-out;
}

/* Form Actions */
.form-actions {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-checkout-submit {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.btn-checkout-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-checkout-submit:hover:not(:disabled)::before {
    left: 100%;
}

.btn-checkout-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-checkout-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-checkout-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-spinner {
    display: inline-block;
    position: relative;
    z-index: 1;
}

.spinner {
    width: 22px;
    height: 22px;
    animation: rotate 1s linear infinite;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-width: 3;
    animation: dash 1.5s ease-in-out infinite;
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: calc(120px + env(safe-area-inset-top));
}

.summary-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInRight 0.6s ease-out 0.2s both;
    transition: all 0.3s;
}

.summary-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.summary-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.order-items {
    margin-bottom: 2rem;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.order-items::-webkit-scrollbar {
    width: 6px;
}

.order-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    animation: slideIn 0.4s ease-out;
}

.order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-item:hover {
    padding-left: 0.5rem;
}

.order-item-details {
    flex: 1;
    min-width: 0;
}

.order-item-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.order-item-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.order-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
}

.order-totals {
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.total-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    margin-bottom: 0;
    font-family: 'Montserrat', sans-serif;
}

.total-row.total span:last-child {
    color: var(--accent);
    font-size: 1.75rem;
}

.link-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 0;
}

.link-back:hover {
    color: var(--accent-hover);
    gap: 0.75rem;
    transform: translateX(-4px);
}

/* Promo Code Section - Stylish */
.promo-section-checkout {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-input-group-checkout {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.promo-input-checkout {
    flex: 1;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-input-checkout:focus {
    outline: none;
    border-color: #1e3a8a;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2),
                0 4px 12px rgba(30, 58, 138, 0.15);
    transform: translateY(-1px);
}

.promo-input-checkout::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-apply-promo-checkout {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
}

.btn-apply-promo-checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-apply-promo-checkout:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-apply-promo-checkout:hover::before {
    left: 100%;
}

.btn-apply-promo-checkout:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.4);
}

.btn-apply-promo-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.promo-message-checkout {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
    font-weight: 500;
}

.promo-message-checkout.success {
    color: #10b981;
}

.promo-message-checkout.error {
    color: #ef4444;
}

.applied-promo-checkout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    margin-top: 0.75rem;
    animation: slideInPromo 0.3s ease-out;
}

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

.applied-promo-checkout span {
    color: #10b981;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-remove-promo-checkout {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-promo-checkout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-remove-promo-checkout:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .order-summary {
        position: static;
    }
    
    .checkout-form-section,
    .summary-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .checkout-main {
        padding: 2rem 0 4rem;
        padding-top: calc(100px + env(safe-area-inset-top));
    }

    .checkout-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .checkout-form-section,
    .summary-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.875rem 1rem;
    }
    
    .btn-checkout-submit {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .order-items {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .checkout-main .container {
        padding: 0 16px;
    }
    
    .checkout-form-section,
    .summary-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .checkout-title {
        font-size: 1.75rem;
    }
}

/* iOS Optimizations */
@supports (-webkit-touch-callout: none) {
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .checkout-main {
        -webkit-overflow-scrolling: touch;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .checkout-form-section,
    .summary-card {
        border-width: 2px;
    }
    
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .checkout-form-section,
    .summary-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn-checkout-submit {
        display: none;
    }
}
