/* WooCommerce Custom Framing Configurator Styles */

.wcf-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Step Wizard */
.wcf-step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.wcf-step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.wcf-step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.wcf-step-dot.active {
    background-color: #0073aa;
    border-color: #0073aa;
    color: white;
}

.wcf-step-dot.completed {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.wcf-step-dot.completed::after {
    content: '✓';
}

.wcf-step-dot:hover {
    transform: scale(1.1);
}

/* Steps */
.wcf-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wcf-step-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.wcf-step-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Product Type Cards */
.wcf-product-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wcf-product-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wcf-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wcf-product-card.selected {
    border-color: #0073aa;
    background-color: #f0f8ff;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.wcf-product-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.wcf-product-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

/* File Upload */
.wcf-upload-zone {
    border: 2px dashed #0073aa;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.wcf-upload-zone:hover,
.wcf-upload-zone.drag-over {
    background-color: #f0f8ff;
    border-color: #005a87;
}

.wcf-upload-zone input[type="file"] {
    display: none;
}

.wcf-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.wcf-upload-subtext {
    font-size: 12px;
    color: #999;
}

.wcf-photo-preview {
    margin-top: 20px;
    text-align: center;
}

.wcf-photo-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Finish Selection */
.wcf-finish-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wcf-finish-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcf-finish-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wcf-finish-card.selected {
    border-color: #0073aa;
    background-color: #f0f8ff;
    font-weight: bold;
}

.wcf-finish-name {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.wcf-finish-price {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Mat Colors */
.wcf-mat-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.wcf-mat-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.wcf-mat-swatch:hover {
    transform: scale(1.15);
    border-color: #999;
}

.wcf-mat-swatch.selected {
    border-color: #0073aa;
    border-width: 5px;
}

.wcf-mat-label {
    font-size: 12px;
    margin-top: 5px;
    max-width: 60px;
    word-wrap: break-word;
    text-align: center;
}

/* Glass Types */
.wcf-glass-cards {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.wcf-glass-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcf-glass-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wcf-glass-card.selected {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.wcf-glass-info {
    flex: 1;
}

.wcf-glass-name {
    font-weight: bold;
    color: #333;
}

.wcf-glass-desc {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.wcf-glass-price {
    font-weight: bold;
    color: #0073aa;
}

/* Dimensions */
.wcf-dimensions-form {
    margin-bottom: 30px;
}

.wcf-form-group {
    margin-bottom: 20px;
}

.wcf-form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.wcf-form-input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wcf-form-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.wcf-dimension-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Quantity Selector */
.wcf-quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.wcf-quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.wcf-quantity-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.wcf-quantity-input {
    width: 60px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

/* Canvas Preview */
.wcf-canvas-preview {
    margin: 30px 0;
    text-align: center;
}

.wcf-canvas-preview canvas {
    border: 1px solid #ddd;
    border-radius: 8px;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: white;
}

/* Price Breakdown */
.wcf-price-breakdown {
    margin: 30px 0;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.wcf-price-breakdown-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.wcf-breakdown-table {
    width: 100%;
    font-size: 14px;
    margin-bottom: 15px;
}

.wcf-breakdown-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.wcf-breakdown-table tr:last-child {
    border-bottom: none;
}

.wcf-breakdown-table td {
    padding: 10px 0;
}

.wcf-breakdown-table td:first-child {
    color: #666;
}

.wcf-breakdown-table td:last-child {
    text-align: right;
    font-weight: bold;
    color: #333;
}

.wcf-total-price {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    text-align: right;
    padding-top: 10px;
    border-top: 2px solid #0073aa;
}

/* Shipping Estimate */
.wcf-shipping-section {
    margin: 30px 0;
    padding: 20px;
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.wcf-shipping-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.wcf-shipping-weight {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.wcf-shipping-zip {
    margin-bottom: 15px;
}

.wcf-shipping-zip input {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wcf-shipping-button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.wcf-shipping-button:hover {
    background-color: #005a87;
}

.wcf-shipping-rates {
    margin-top: 15px;
}

.wcf-rates-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcf-rates-table thead {
    background-color: #f0f0f0;
}

.wcf-rates-table th,
.wcf-rates-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wcf-rates-table tr:last-child td {
    border-bottom: none;
}

.wcf-rates-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* AI Visualization */
.wcf-viz-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.wcf-viz-button:hover {
    background-color: #218838;
}

.wcf-viz-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.wcf-viz-modal.active {
    display: flex;
}

.wcf-viz-content {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

.wcf-viz-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcf-viz-close:hover {
    background: rgba(0,0,0,0.8);
}

.wcf-viz-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.wcf-viz-note {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}

/* Summary */
.wcf-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.wcf-summary-table th,
.wcf-summary-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wcf-summary-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.wcf-summary-table tr:last-child td {
    border-bottom: none;
}

/* Navigation */
.wcf-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.wcf-nav-button {
    padding: 12px 24px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.wcf-nav-button.prev {
    background-color: #e0e0e0;
    color: #333;
}

.wcf-nav-button.prev:hover {
    background-color: #ccc;
}

.wcf-nav-button.next {
    background-color: #0073aa;
    color: white;
}

.wcf-nav-button.next:hover {
    background-color: #005a87;
}

.wcf-nav-button.add-to-cart {
    background-color: #28a745;
    color: white;
}

.wcf-nav-button.add-to-cart:hover {
    background-color: #218838;
}

.wcf-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Spinner */
.wcf-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: wcf-spin 0.8s linear infinite;
}

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

/* Messages */
.wcf-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.wcf-message.show {
    display: block;
}

.wcf-message.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.wcf-message.success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.wcf-message.info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .wcf-step-indicator {
        margin-bottom: 30px;
    }
    
    .wcf-step-dot {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .wcf-product-types {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .wcf-product-card {
        padding: 15px;
        min-height: 150px;
    }
    
    .wcf-product-icon {
        font-size: 32px;
    }
    
    .wcf-finish-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wcf-step-nav {
        flex-direction: column;
    }
    
    .wcf-nav-button {
        width: 100%;
    }
    
    .wcf-form-input {
        max-width: 100%;
    }
}
