/**
 * Product Wizard Styles
 *
 * @package MallorcaRenting
 * @since 1.0.0
 */

.product-wizard-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

/* Progress Bar */
.wizard-progress {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 20px;
}

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

.progress-fill {
    background: linear-gradient(90deg, #007cba, #00a0d2);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    transition: color 0.3s;
}

.step-indicator.active {
    color: #007cba;
    font-weight: 600;
}

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

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s;
}

.step-indicator.active .step-number {
    background: #007cba;
    color: white;
}

.step-indicator.completed .step-number {
    background: #28a745;
    color: white;
}

.step-indicator.completed .step-number::before {
    content: '✓';
    font-weight: bold;
}

/* Wizard Content */
.wizard-content {
    display: flex;
    min-height: 500px;
}

.wizard-steps {
    flex: 1;
    padding: 30px;
}

.wizard-step {
    animation: fadeInSlide 0.4s ease;
}

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

.step-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.step-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.step-content {
    margin-bottom: 40px;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.step-navigation .btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #007cba, #00a0d2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87, #007cba);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #34ce57);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e7e34, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

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

/* Category Selection */
.category-selection {
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-item {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    text-align: center;
}

.category-item:hover {
    border-color: #007cba;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
}

.category-item.selected {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8fcff, #e6f3ff);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.2);
}

.category-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.category-item h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.category-item p {
    color: #666;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.category-item .category-count {
    background: #007cba;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 10px;
    display: inline-block;
}

/* Product Selection */
.product-selection {
    margin-top: 20px;
}

.selection-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.selection-info p {
    margin: 0;
    color: #1565c0;
    font-weight: 500;
}

.product-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.product-search {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
}

.product-sort {
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: white;
    min-width: 180px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.product-item {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.product-item:hover {
    border-color: #007cba;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.product-item.selected {
    border-color: #007cba;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.2);
}

.product-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    line-height: 1.3;
}

.product-info p {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.product-price {
    font-weight: 700;
    color: #28a745;
    font-size: 16px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.product-rating .stars {
    color: #ffc107;
}

.product-rating .rating-text {
    color: #666;
    font-size: 12px;
}

/* Booking Details */
.booking-details {
    max-width: 600px;
    margin: 0 auto;
}

.booking-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
    outline: 0;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Add-on Selection */
.addon-selection {
    margin-top: 20px;
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.addon-item {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.addon-item:hover {
    border-color: #007cba;
    background: #f8fcff;
}

.addon-item.selected {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8fcff, #e6f3ff);
}

.addon-checkbox {
    width: 20px;
    height: 20px;
}

.addon-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.addon-info p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 13px;
}

.addon-price {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
}

/* Custom Fields */
.custom-fields {
    max-width: 600px;
    margin: 0 auto;
}

.custom-fields .form-group {
    margin-bottom: 25px;
}

.required {
    color: #dc3545;
}

.field-description {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.4;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

/* Cart Summary */
.wizard-cart-summary {
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
    padding: 30px;
    width: 350px;
    flex-shrink: 0;
}

.wizard-cart-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.cart-item img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.cart-item-price {
    color: #28a745;
    font-weight: 600;
    font-size: 13px;
}

.cart-total {
    padding: 20px 0;
    border-top: 2px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 18px;
}

.total-label {
    color: #333;
}

.total-amount {
    color: #28a745;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    margin-left: 10px;
}

.loading-spinner::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error States */
.wizard-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .wizard-content {
        flex-direction: column;
    }

    .wizard-cart-summary {
        width: 100%;
        border-left: none;
        border-top: 1px solid #dee2e6;
    }

    .step-indicators {
        justify-content: center;
    }

    .step-indicator .step-title {
        display: none;
    }
}

@media (max-width: 768px) {
    .product-wizard-container {
        border-radius: 0;
        margin: 0;
    }

    .wizard-steps {
        padding: 20px;
    }

    .step-header h2 {
        font-size: 24px;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .product-filters {
        flex-direction: column;
    }

    .step-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .step-navigation .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wizard-progress {
        padding: 15px;
    }

    .step-indicators {
        gap: 5px;
    }

    .step-number {
        width: 25px;
        height: 25px;
        font-size: 11px;
    }

    .wizard-cart-summary {
        padding: 20px;
    }

    .booking-form {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Theme Variations */
.product-wizard-container[data-theme="modern"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.product-wizard-container[data-theme="modern"] .wizard-progress {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.product-wizard-container[data-theme="modern"] .step-header h2 {
    color: white;
}

.product-wizard-container[data-theme="minimal"] {
    box-shadow: none;
    border: 1px solid #e9ecef;
}

.product-wizard-container[data-theme="minimal"] .wizard-progress {
    background: transparent;
    border-bottom: none;
}

.product-wizard-container[data-theme="elegant"] {
    background: #fafafa;
    border: 2px solid #e8e8e8;
}

.product-wizard-container[data-theme="elegant"] .wizard-steps {
    background: white;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}