/* Customer Journey System Styles */

/* Progress Bar */
.journey-progress {
    background: var(--white);
    border-bottom: 1px solid var(--grey-light);
    padding: 20px 0;
    position: sticky;
    top: 80px; /* Position below the fixed navbar */
    z-index: 999; /* Below navbar but above other content */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.progress-bar {
    background: var(--grey-light);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    height: 100%;
    width: 20%;
    transition: width 0.5s ease;
    border-radius: 3px;
}

/* Step Indicators */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    position: relative;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--grey-light);
    transform: translateX(-50%);
    z-index: -1;
}

.step-indicator:last-child::after {
    display: none;
}

.step-indicator.completed::after {
    background: var(--primary-color);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--grey-light);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-indicator.active .step-number {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
    transform: scale(1.1);
}

.step-indicator.completed .step-number {
    background: var(--primary-color);
    color: var(--white);
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.2;
    max-width: 80px;
}

.step-indicator.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-indicator.completed .step-label {
    color: var(--primary-color);
}

/* Step Navigation */
.step-navigation {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 40px 0;
    margin: 40px 0;
}

.step-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.step-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--white);
}

.step-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.step-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.step-actions .btn {
    min-width: 140px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

/* Journey Messages */
.journey-message {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: var(--white);
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.journey-message.success {
    background: #10b981;
}

.journey-message.info {
    background: var(--primary-color);
}

.journey-message.warning {
    background: #f59e0b;
}

.journey-message.error {
    background: #ef4444;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .step-indicator::after {
        display: none;
    }
    
    .step-label {
        font-size: 11px;
        max-width: 100px;
    }
    
    .step-content h3 {
        font-size: 1.5rem;
    }
    
    .step-content p {
        font-size: 1rem;
    }
    
    .step-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .step-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .journey-message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .journey-progress {
        padding: 15px 0;
    }
    
    .progress-container {
        padding: 0 15px;
    }
    
    .step-content {
        padding: 0 15px;
    }
    
    .step-content h3 {
        font-size: 1.3rem;
    }
    
    .step-content p {
        font-size: 0.95rem;
    }
}

/* Enhanced Step Navigation for Different Pages */
.step-navigation.shop-step {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    margin: 40px 0 0 0;
    border-radius: 12px;
    color: var(--white);
}

.shop-header .step-navigation.shop-step .step-content h3 {
    color: var(--white) !important;
    font-weight: 700;
    margin-bottom: 15px;
}

.shop-header .step-navigation.shop-step .step-content p {
    color: var(--white) !important;
    opacity: 0.9;
    margin-bottom: 25px;
}

/* Button styling for shop-step navigation */
.shop-header .step-navigation.shop-step .step-actions .btn-outline {
    background: transparent;
    color: var(--white) !important;
    border-color: var(--white);
    border-width: 2px;
    font-weight: 600;
}

.shop-header .step-navigation.shop-step .step-actions .btn-outline:hover {
    background: var(--white);
    color: var(--primary-color) !important;
    border-color: var(--white);
    transform: translateY(-2px);
}

.shop-header .step-navigation.shop-step .step-actions .btn-primary {
    background: var(--white);
    color: var(--primary-color) !important;
    border-color: var(--white);
    font-weight: 600;
}

.shop-header .step-navigation.shop-step .step-actions .btn-primary:hover {
    background: var(--grey-light);
    color: var(--primary-color) !important;
    border-color: var(--grey-light);
    transform: translateY(-2px);
}

.step-navigation.designer-step {
    background: linear-gradient(135deg, #059669, #047857);
}

.step-navigation.contact-step {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.step-navigation.account-step {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

/* Step Progress Animation */
.step-indicator:hover .step-number {
    transform: scale(1.05);
}

.step-indicator:hover .step-label {
    color: var(--primary-color);
}

/* Progress Bar Animation */
.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Journey Overview Modal */
.journey-overview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--grey-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.8rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--grey-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 30px;
}

.journey-summary {
    text-align: center;
    margin-bottom: 30px;
}

.journey-summary h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.progress-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
}

.journey-steps-detail {
    margin-bottom: 30px;
}

.step-detail {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-detail.completed {
    background: var(--grey-light);
    border-color: var(--primary-color);
}

.step-detail:not(.completed) {
    background: var(--white);
    border: 2px solid var(--grey-light);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grey-light);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-detail.completed .step-icon {
    background: var(--primary-color);
    color: var(--white);
}

.step-info h4 {
    color: var(--text-dark);
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.step-info p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

.journey-actions-modal {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.journey-actions-modal .btn {
    min-width: 120px;
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .progress-circle {
        width: 100px;
        height: 100px;
        font-size: 1.5rem;
    }
    
    .journey-actions-modal {
        flex-direction: column;
        align-items: center;
    }
    
    .journey-actions-modal .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Adjust page headers when progress bar is present */
.journey-progress + .shop-header,
.journey-progress + .gallery-header,
.journey-progress + .designer-header,
.journey-progress + .account-header,
.journey-progress + .contact-header {
    padding-top: 140px; /* Additional padding to account for progress bar */
}

.journey-progress + .hero {
    padding-top: 140px; /* Additional padding for homepage hero */
}

/* When progress bar is not present, use normal padding */
.shop-header,
.gallery-header,
.designer-header,
.account-header,
.contact-header {
    padding-top: 120px; /* Normal padding for page headers */
}

/* Shop header specific styling when step navigation is integrated */
.shop-header .step-navigation {
    margin-top: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.shop-header .step-navigation .step-content {
    padding: 30px 20px;
}

.shop-header .step-navigation .step-content h3 {
    margin-bottom: 15px;
}

.shop-header .step-navigation .step-content p {
    margin-bottom: 25px;
}

.hero {
    padding-top: 120px; /* Normal padding for homepage hero */
}
