/**
 * OnePage Checkout - Enhanced Stylesheet
 */

/* ========== General Styles ========== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.checkout-container {
    background: #f8f9fa;
    min-height: 100vh;
}

/* ========== Progress Bar ========== */
.checkout-progress-wrapper {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

.checkout-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.checkout-progress::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
    color: #999;
    transition: all 0.3s ease;
}

.progress-step.active .step-icon {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.progress-step.completed .step-icon {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.progress-step.completed .step-icon i::before {
    content: '\f00c';
}

.step-text {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    transition: all 0.3s ease;
}

.progress-step.active .step-text {
    color: #007bff;
    font-weight: 600;
}

.progress-step.completed .step-text {
    color: #28a745;
}

/* ========== Product Section Styles ========== */
.category-header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    border-radius: 15px;
    margin-bottom: 40px;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.category-subtitle {
    font-size: 1.1rem;
    margin: 0;
}

.product-group {
    margin-bottom: 50px;
}

.group-header {
    text-align: center;
    margin-bottom: 30px;
}

.group-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.group-description {
    font-size: 1rem;
    margin: 0;
}

/* ========== Product Cards Grid ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card-wrapper {
    position: relative;
}

.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.product-card.popular {
    border: 2px solid #007bff;
    transform: scale(1.05);
}

.product-card.popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(238,90,36,0.3);
}

.popular-badge i {
    margin-right: 5px;
}

/* ========== Product Card Content ========== */
.product-header {
    padding: 25px 25px 15px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.product-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.product-price {
    margin-bottom: 10px;
}

.price-main {
    font-size: 2.5rem;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
}

.price-period {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.product-features {
    padding: 20px 25px;
    flex-grow: 1;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.feature-item i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    flex-shrink: 0;
}

.product-footer {
    padding: 20px 25px 25px;
    border-top: 1px solid #f0f0f0;
}

/* ========== Order Buttons ========== */
.select-product-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(40,167,69,0.3);
    position: relative;
    overflow: hidden;
}

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

.select-product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.4);
    color: white;
}

.select-product-btn:hover::before {
    left: 100%;
}

.select-product-btn:active {
    transform: translateY(0);
}

/* ========== Pricing Options ========== */
.pricing-options {
    text-align: center;
}

.cycle-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
}

.cycle-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

/* ========== Product Comparison Table ========== */
.comparison-table {
    margin-bottom: 0;
}

.comparison-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.comparison-table td {
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.comparison-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ========== Why Choose Us Section ========== */
.feature-icon {
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: translateY(-5px);
}

.feature-icon i {
    transition: all 0.3s ease;
}

.feature-icon:hover i {
    transform: scale(1.1);
}

/* ========== Modern Cards ========== */
.modern-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.modern-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
}

.modern-card .card-header h4,
.modern-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.modern-card .card-body {
    padding: 30px 25px;
}

/* ========== Form Sections ========== */
.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title i {
    color: #667eea;
    margin-right: 10px;
}

/* ========== Enhanced Form Controls ========== */
.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-group {
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-right: none;
    color: #667eea;
    font-size: 16px;
}

.form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.15);
    background: white;
}

.form-control::placeholder {
    color: #bbb;
}

/* ========== Toggle Password Button ========== */
.toggle-password {
    cursor: pointer;
    border-left: none;
}

.toggle-password:hover {
    background: #e9ecef;
}

/* ========== Password Strength Bar ========== */
#password-strength-bar {
    border-radius: 3px;
    overflow: hidden;
    background: #e9ecef;
}

#password-strength-bar .progress-bar {
    transition: all 0.3s ease;
}

/* ========== Payment Methods Grid ========== */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.payment-method-card {
    position: relative;
}

.payment-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    margin: 0;
}

.payment-label:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102,126,234,0.1);
    transform: translateY(-2px);
}

.payment-radio:checked + .payment-label {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    box-shadow: 0 5px 15px rgba(102,126,234,0.2);
}

.payment-method-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.payment-logo,
.payment-icon {
    margin-right: 15px;
}

.payment-logo img {
    max-height: 40px;
    width: auto;
}

.payment-name strong {
    display: block;
    font-size: 16px;
    color: #333;
}

.payment-name small {
    font-size: 12px;
    color: #999;
}

.payment-check {
    font-size: 24px;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.payment-radio:checked + .payment-label .payment-check {
    color: #28a745;
}

/* ========== Payment Security ========== */
.payment-security {
    animation: fadeIn 0.5s ease;
}

.security-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ========== Order Summary ========== */
.order-summary-card {
    border-radius: 15px;
    overflow: hidden;
}

.order-summary-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cart-item-modern {
    animation: slideIn 0.3s ease;
}

.item-name {
    display: flex;
    align-items: center;
    font-size: 15px;
}

.item-price {
    font-size: 18px;
}

.remove-item {
    transition: all 0.3s ease;
}

.remove-item:hover {
    transform: scale(1.1);
}

.total-row {
    font-size: 14px;
    padding: 5px 0;
}

.total-row-main {
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    padding: 15px;
    border-radius: 8px;
}

/* ========== Promo Code ========== */
.promo-code-section {
    animation: fadeIn 0.3s ease;
}

#togglePromoCode {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
}

#togglePromoCode:hover {
    color: #764ba2;
    text-decoration: none;
}

/* ========== Trust Badges ========== */
.trust-badge {
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

/* ========== Complete Order Button ========== */
.complete-order-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 10px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(40,167,69,0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.complete-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(40,167,69,0.4);
}

.complete-order-btn:hover::before {
    left: 100%;
}

.complete-order-btn:active {
    transform: translateY(-1px);
}

/* ========== TOS Checkbox ========== */
.tos-checkbox {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.tos-checkbox .custom-control-label {
    font-size: 14px;
    line-height: 1.6;
}

/* ========== Alerts ========== */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    animation: slideDown 0.3s ease;
}

.alert i {
    font-size: 18px;
}

/* ========== Sticky Elements ========== */
@media (min-width: 992px) {
    .sticky-top {
        position: sticky;
        top: 20px;
        z-index: 100;
    }
}

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

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

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

/* ========== Loading States ========== */
.spinner-border-sm {
    width: 1.2rem;
    height: 1.2rem;
    border-width: 0.2em;
}

/* ========== Custom Select ========== */
.custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23667eea' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    border-radius: 8px;
    padding: 12px 15px;
}

/* ========== Scrollbar Styling ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========== Checkout Sections ========== */
.checkout-section {
    animation: fadeIn 0.5s ease;
}

/* ========== Validation States ========== */
.is-invalid {
    border-color: #dc3545 !important;
    animation: shake 0.3s ease;
}

.is-valid {
    border-color: #28a745 !important;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 13px;
    margin-top: 5px;
}

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

/* ========== No Products State ========== */
.no-products {
    background: white;
    border-radius: 15px;
    margin: 40px 0;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
    .modern-card .card-body {
        padding: 20px 15px;
    }
    
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-progress::before {
        display: none;
    }
    
    .progress-step {
        flex: 0 0 auto;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step-text {
        font-size: 11px;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card.popular {
        transform: none;
    }
    
    .product-card.popular:hover {
        transform: translateY(-8px);
    }
}