.custom-jewellery-page {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f9f7f7 0%, #f0f0f0 100%);
    min-height: calc(100vh - 200px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.customization-flow {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.flow-progress {
    padding: 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 10%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #95a5a6;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #3498db;
    border-color: #3498db;
    color: white;
    transform: scale(1.1);
}

.step-label {
    font-size: 0.9rem;
    color: #95a5a6;
    text-align: center;
    font-weight: 500;
}

.step.active .step-label {
    color: #2c3e50;
    font-weight: 600;
}

.flow-content {
    padding: 3rem;
}

.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step-content.active {
    display: block;
}

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

.step-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.step-content > p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.animal-detail-wrap {
    margin-top: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
}

.animal-detail-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.animal-detail-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.animal-detail-input:focus {
    outline: none;
    border-color: #3498db;
}

.selection-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.selection-card.selected {
    border-color: #2ecc71;
    background: #f8fff9;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.2);
}

.selection-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.selection-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.selection-card.selected .selection-icon {
    background: #2ecc71;
}

.selection-card.selected .selection-icon img {
    filter: brightness(0) invert(1);
}

/* Gemstone colour circles — icon always white on coloured bg */
.gemstone img {
    filter: brightness(0) invert(1);
}

.gemstone.green-jade { background: #2ecc71; }
.gemstone.honey-jade { background: #f39c12; }
.gemstone.diamond { background: #ecf0f1; color: #2c3e50 !important; }
.gemstone.ruby { background: #e74c3c; }
.gemstone.sapphire { background: #3498db; }
.gemstone.emerald { background: #27ae60; }

.selection-card h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.selection-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.price-info {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: auto;
}

.preview-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* AI Preview — Step 5 */
.preview-image-wrapper {
    background: #f8f9fa;
    border-radius: 15px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e9ecef;
    position: relative;
    overflow: hidden;
}

.ai-preview-placeholder {
    text-align: center;
    color: #95a5a6;
    padding: 2rem;
}

.ai-preview-placeholder img {
    display: block;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.ai-preview-placeholder p {
    font-size: 0.95rem;
}

.ai-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 13px;
    max-height: 400px;
}

.ai-loading {
    text-align: center;
    color: #7f8c8d;
}

.ai-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e9ecef;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-error {
    color: #e74c3c;
    font-size: 0.95rem;
    text-align: center;
    padding: 1rem;
}

.preview-generate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-outline {
    background: white;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

/* Confirm preview thumbnail — Step 7 */
.confirmation-preview-img-wrap {
    margin-bottom: 1.5rem;
    text-align: center;
}

.confirm-preview-img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid #e9ecef;
}

.preview-details {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.preview-details h3 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.summary-item span:first-child {
    color: #7f8c8d;
    font-weight: 500;
}

.summary-item span:last-child {
    color: #2c3e50;
    font-weight: 600;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.confirmation-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.confirmation-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.confirmation-card h3 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item span:first-child {
    color: #7f8c8d;
    font-weight: 500;
}

.detail-item span:last-child {
    color: #2c3e50;
    font-weight: 600;
}

.confirmation-notes {
    background: #fff8e1;
    border-radius: 15px;
    padding: 2rem;
    border-left: 4px solid #f39c12;
}

.confirmation-notes h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.confirmation-notes ul {
    list-style: none;
    padding: 0;
}

.confirmation-notes li {
    padding: 0.5rem 0;
    color: #7f8c8d;
    position: relative;
    padding-left: 1.5rem;
}

.confirmation-notes li::before {
    content: '•';
    color: #f39c12;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.payment-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.payment-summary {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.payment-summary h3 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.payment-summary .summary-item.total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    border-top: 2px solid #f8f9fa;
    margin-top: 1rem;
    padding-top: 1rem;
}

.payment-methods {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.payment-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-option {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #3498db;
}

.payment-option.active {
    border-color: #2ecc71;
    background: #f8fff9;
}

.payment-option img {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.payment-method-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.payment-option.active img {
    filter: none;
}

.payment-form {
    display: none;
}

.payment-form.active {
    display: block;
}

.payment-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.payment-form input:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.payment-success {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.success-icon img {
    width: 64px;
    height: 64px;
}

.payment-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.completion-screen {
    text-align: center;
    padding: 3rem;
}

.completion-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.completion-icon img {
    width: 96px;
    height: 96px;
}

.completion-screen h2 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.completion-screen > p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.completion-details {
    max-width: 500px;
    margin: 2rem auto;
}

.detail-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.detail-card h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.status {
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status.in-production {
    background: #fff8e1;
    color: #f39c12;
}

.completion-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.completion-note {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
    color: #7f8c8d;
}

.flow-navigation {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1c5a7a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: white;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Utility */
.hidden {
    display: none !important;
}

/* 2-column grid for Step 6 */
.selection-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Inline button icons */
.btn-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 0.4rem;
    filter: brightness(0) invert(1);
}

.btn-outline .btn-icon,
.btn-secondary .btn-icon {
    filter: none;
}

/* Auth modal hint text */
.auth-modal-hint {
    text-align: center;
    font-size: 0.9rem;
    color: #e74c3c;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Footer / nav icons */
.footer-icon,
.nav-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .step {
        flex: 0 0 calc(33.333% - 1rem);
    }
    
    .selection-grid {
        grid-template-columns: 1fr;
    }

    .selection-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .preview-container,
    .confirmation-summary,
    .payment-container {
        grid-template-columns: 1fr;
    }
    
    .flow-content {
        padding: 1.5rem;
    }
    
    .step-content h2 {
        font-size: 1.5rem;
    }
    
    .completion-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
