/* Table Tennis Racket Configurator Wizard Styles */
:root {
    --ttrc-primary: #e8363c;
    --ttrc-primary-hover: #cf292f;
    --ttrc-bg: #f8f9fa;
    --ttrc-border: #e2e4e7;
    --ttrc-text: #202124;
    --ttrc-text-light: #5f6368;
    --ttrc-white: #ffffff;
    --ttrc-success: #34a853;
}

.ttrc-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
    color: var(--ttrc-text);
    margin: 20px auto;
    max-width: 1200px;
    background: var(--ttrc-bg);
    min-height: 500px;
    border-radius: 12px;
    position: relative;
    box-sizing: border-box;
    overflow: visible;
}

.ttrc-container * {
    box-sizing: border-box;
}

.ttrc-loading-spinner,
.ttrc-error,
.ttrc-empty {
    text-align: center;
    padding: 40px;
    font-size: 1.1em;
    color: var(--ttrc-text-light);
}

.ttrc-wiz-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Header */
.ttrc-wiz-top-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.ttrc-wiz-top-header h2 {
    margin: 0 0 10px;
    font-size: 2.2em;
    font-weight: 700;
    color: var(--ttrc-text);
}

.ttrc-wiz-top-header p {
    margin: 0;
    font-size: 1.1em;
    color: var(--ttrc-text-light);
}

/* Progress */
.ttrc-wiz-progress-cnt {
    display: flex;
    justify-content: center;
    padding: 20px 0 40px;
}

.ttrc-wiz-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ttrc-wiz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ccc;
    position: relative;
    transition: all 0.3s ease;
}

.ttrc-wiz-step.active,
.ttrc-wiz-step.completed {
    color: var(--ttrc-primary);
}

.ttrc-wiz-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: var(--ttrc-bg);
    margin-bottom: 8px;
    z-index: 2;
    transition: all 0.3s ease;
}

.ttrc-wiz-step.active .ttrc-wiz-step-circle {
    border-color: var(--ttrc-primary);
    color: var(--ttrc-primary);
}

.ttrc-wiz-step.completed .ttrc-wiz-step-circle {
    border-color: var(--ttrc-primary);
    background: var(--ttrc-primary);
    color: var(--ttrc-white);
}

.ttrc-wiz-step-label {
    font-size: 0.85em;
    font-weight: 500;
}

.ttrc-wiz-step-line {
    width: 60px;
    height: 2px;
    background: #ccc;
    margin-top: -20px;
    transition: all 0.3s ease;
}

.ttrc-wiz-step-line.completed {
    background: var(--ttrc-primary);
}

/* Panel */
.ttrc-wiz-panel {
    padding: 0 40px 40px;
    flex-grow: 1;
}

.ttrc-wiz-panel-header {
    margin-bottom: 30px;
}

.ttrc-wiz-panel-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.ttrc-wiz-panel-title-area {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1 1 auto;
}

.ttrc-wiz-panel-actions-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.ttrc-wiz-search {
    width: 300px;
    padding: 10px 15px;
    border: 1px solid var(--ttrc-border);
    border-radius: 6px !important;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0.95em;
    font-family: inherit;
    color: var(--ttrc-text);
    outline: none;
    transition: border-color 0.2s;
}

.ttrc-wiz-sort {
    width: 165px;
    padding: 10px 12px;
    border: 1px solid var(--ttrc-border);
    border-radius: 6px !important;
    font-size: 0.95em;
    font-family: inherit;
    color: var(--ttrc-text);
    outline: none;
    transition: border-color 0.2s;
}

.ttrc-wiz-search:focus,
.ttrc-wiz-sort:focus {
    border-color: var(--ttrc-primary);
}

.ttrc-wiz-panel-num {
    background: rgba(26, 115, 232, 0.1);
    color: var(--ttrc-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
    margin-top: 2px;
    flex-shrink: 0;
}

.ttrc-wiz-panel-text h3 {
    margin: 0 0 5px;
    font-size: 1.4em;
    font-weight: 600;
}

.ttrc-wiz-panel-text p {
    margin: 0;
    color: var(--ttrc-text-light);
    font-size: 0.95em;
}

/* Grid */
.ttrc-wiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* Cards */
.ttrc-wiz-card {
    background: var(--ttrc-white);
    border: 1px solid var(--ttrc-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ttrc-wiz-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.ttrc-wiz-card.selected {
    border: 2px solid var(--ttrc-primary);
    box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.2);
}

.ttrc-wiz-card-img {
    height: 200px;
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow: hidden;
}

.ttrc-wiz-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transform: scale(1.5);
    transition: transform 0.3s ease;
}

.ttrc-wiz-card:hover .ttrc-wiz-card-img img {
    transform: scale(1.55);
    /* zoom in slightly more on hover */
}

.ttrc-wiz-card-content {
    padding: 20px;
    flex-grow: 1;
}

.ttrc-wiz-card-title-link {
    text-decoration: none;
    color: inherit;
}

.ttrc-wiz-card-title-link:hover .ttrc-wiz-card-title {
    color: var(--ttrc-primary);
}

.ttrc-wiz-card-title {
    margin: 0 0 8px;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.2s;
}

.ttrc-wiz-card-desc {
    margin: 0 0 15px;
    font-size: 0.9em;
    color: var(--ttrc-text-light);
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Attributes */
.ttrc-wiz-attrs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ttrc-wiz-attr-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: var(--ttrc-text-light);
    margin-bottom: 4px;
    font-weight: 500;
}

.ttrc-wiz-attr-bar {
    height: 4px;
    background: #e8f0fe;
    border-radius: 2px;
    overflow: hidden;
}

.ttrc-wiz-attr-fill {
    height: 100%;
    background: #1a73e8;
    /* Keep charts blue */
    border-radius: 2px;
}

/* Card Footer */
.ttrc-wiz-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ttrc-white);
}

.ttrc-wiz-card-price {
    font-size: 1.3em;
    font-weight: 700;
}

.ttrc-wiz-btn-select {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--ttrc-border);
    background: var(--ttrc-white);
    color: var(--ttrc-text);
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
}

.ttrc-wiz-card:hover .ttrc-wiz-btn-select {
    border-color: var(--ttrc-primary);
    color: var(--ttrc-primary);
}

.ttrc-wiz-card.selected .ttrc-wiz-btn-select {
    background: rgba(26, 115, 232, 0.1);
    color: var(--ttrc-primary);
    border-color: rgba(26, 115, 232, 0.2);
}

/* Sticky Footer */
.ttrc-wiz-footer {
    position: sticky;
    bottom: 0px;
    left: 0;
    width: 100%;
    background: var(--ttrc-white);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 100;
    border-top: 1px solid var(--ttrc-border);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    margin-top: auto;
}

.ttrc-wiz-footer-inner {
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

@media (max-width: 900px) {
    .ttrc-wiz-footer-inner {
        flex-direction: column;
        padding: 15px 20px;
        align-items: stretch;
    }

    .ttrc-wiz-panel {
        padding: 0 20px 40px;
    }
}

.ttrc-wiz-footer-config {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ttrc-wiz-footer-heading {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    color: var(--ttrc-text);
}

.ttrc-wiz-footer-slots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ttrc-wiz-slot {
    background: #f1f3f4;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--ttrc-text-light);
    border: 1px solid transparent;
}

.ttrc-wiz-slot.filled {
    background: var(--ttrc-white);
    border-color: var(--ttrc-primary);
    color: var(--ttrc-primary);
    font-weight: 500;
}

.ttrc-wiz-footer-action {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.ttrc-wiz-footer-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ttrc-wiz-total-lbl {
    font-size: 0.75em;
    color: var(--ttrc-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ttrc-wiz-total-val {
    font-size: 1.4em;
    font-weight: 700;
    white-space: nowrap;
}

.ttrc-wiz-btn-checkout {
    padding: 12px 24px;
    background: var(--ttrc-primary);
    color: var(--ttrc-white);
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.ttrc-wiz-btn-checkout:hover:not(:disabled) {
    background: var(--ttrc-primary-hover);
}

.ttrc-wiz-btn-checkout:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .ttrc-wiz-panel-actions-area {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .ttrc-wiz-search,
    .ttrc-wiz-sort {
        width: 100%;
    }
}