/* ============================================
   POPUP / MODAL STYLES
   ============================================ */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.popup {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.popup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.popup__header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.popup__close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.popup__close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.popup__content {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

/* Price Popup */
.price-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-list__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.price-list__component {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-list__type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.price-list__name {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.price-list__price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent);
    font-family: 'Monaco', 'Consolas', monospace;
}

.price-list__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-top: 0.75rem;
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.price-list__total span:last-child {
    font-size: 1.25rem;
    color: var(--accent);
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Improved Price Popup */
.popup--price-improved {
    max-width: 600px;
}

.price-list-improved {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.price-item:hover {
    background: var(--bg-hover);
}

.price-item__thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.price-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.price-item__type {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.price-item__name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-item__supplier {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.price-item__supplier svg {
    opacity: 0.6;
}

.price-item__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.price-item__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Monaco', 'Consolas', monospace;
}

.price-item__btns {
    display: flex;
    gap: 0.5rem;
}

.price-item__view-btn,
.price-item__buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.price-item__view-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.price-item__view-btn:hover {
    background: var(--accent);
    color: #000;
}

.price-item__buy-btn {
    background: var(--success);
    color: #000;
    text-decoration: none;
}

.price-item__buy-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Total section */
.price-list__total-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
}

.price-list__total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-list__total-label {
    font-weight: 600;
    color: var(--text-primary);
}

.price-list__total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Monaco', 'Consolas', monospace;
}

.price-list__note {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Compatibility Popup */
.compat-summary {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.compat-summary--ok {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid var(--success);
}

.compat-summary--warning {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid var(--warning);
}

.compat-summary--error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid var(--error);
}

.compat-summary__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.compat-summary--ok .compat-summary__content {
    color: var(--success);
}

.compat-summary--warning .compat-summary__content {
    color: var(--warning);
}

.compat-summary--error .compat-summary__content {
    color: var(--error);
}

.compat-section {
    margin-bottom: 1rem;
}

.compat-section__header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.compat-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
}

.compat-item__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compat-item--ok .compat-item__icon {
    color: var(--success);
}

.compat-item--warning .compat-item__icon {
    color: var(--warning);
}

.compat-item--error .compat-item__icon {
    color: var(--error);
}

.compat-item__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.compat-item__title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.compat-item__message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.compat-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Wattage Popup */
.wattage-summary {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.wattage-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
}

.wattage-summary__row span {
    color: var(--text-secondary);
}

.wattage-summary__row strong {
    color: var(--accent);
    font-size: 1.125rem;
}

.wattage-breakdown {
    margin-bottom: 1rem;
}

.wattage-breakdown__header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.wattage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.wattage-item:last-child {
    border-bottom: none;
}

.wattage-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wattage-item__type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.wattage-item__name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wattage-item__value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: right;
}

.wattage-item__value span {
    min-width: 50px;
    font-weight: 500;
    color: var(--text-primary);
}

.wattage-item__bar {
    width: 80px;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.wattage-item__bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.wattage-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.wattage-tip svg {
    flex-shrink: 0;
    color: #60a5fa;
}

/* Mobile Bottom Sheet */
@media (max-width: 640px) {
    .popup-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .popup {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
    }

    .popup::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: var(--border-light);
        border-radius: 2px;
        margin: 0.75rem auto;
    }

    .popup__header {
        padding-top: 0.5rem;
    }
}

.parts-list__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.badge--price {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.badge--success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}

.badge--warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning);
}

/* Part Rows */
.parts-list__body {
    padding: 0;
}

.part-row {
    display: block;
    padding: 0;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s ease;
}

.part-row:last-child {
    border-bottom: none;
}

.part-row:hover {
    background-color: var(--bg-secondary);
}

.part-row__info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.part-row__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.part-row:hover .part-row__icon {
    color: var(--accent);
}

.part-row__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.part-row__product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.part-row__thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: transparent;
    flex-shrink: 0;
}

.part-row__product-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.part-row__product--empty {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   MERCHANTS TABLE (Product Details Modal)
   ============================================ */

.product-details-modal__merchants {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.merchants-table-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.merchants-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Merchant Row */
.merchant-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.merchant-row:hover {
    background: var(--bg-hover);
}

.merchant-row--lowest {
    background: var(--success-bg);
    border-left: 2px solid var(--success);
}

/* Left section - Logo, name, stock, shipping */
.merchant-row__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.merchant-row__logo-wrap {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
    padding: 3px;
}

.merchant-row__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.merchant-row__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.merchant-row__name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.merchant-row__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-row__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.merchant-row__lowest-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 5px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--success);
    color: #000;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.merchant-row__stock {
    font-size: 0.75rem;
    font-weight: 500;
}

.merchant-row__stock--in {
    color: var(--success);
}

.merchant-row__stock--out {
    color: var(--error);
}

.merchant-row__stock--unknown {
    color: var(--text-muted);
}

.merchant-row__shipping {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* EAN Dropdown - Desktop: compact inline */
.merchant-row__ean-dropdown {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    padding: 3px 22px 3px 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    max-width: 160px;
    transition: border-color 0.15s ease, background 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.375rem center;
    background-size: 12px;
}

html.dark .merchant-row__ean-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.merchant-row__ean-dropdown:hover {
    border-color: var(--border-light);
    background-color: var(--bg-hover);
}

.merchant-row__ean-dropdown:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

.merchant-row__ean-dropdown option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Center section - Price */
.merchant-row__center {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    flex-shrink: 0;
}

.merchant-row__price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.merchant-row__price-label {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.merchant-row__price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.merchant-row__amazon-note {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.merchant-row__amazon-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-style: italic;
}

.merchant-row__updated {
    font-size: 0.625rem;
    color: var(--text-muted);
}

/* Right section - Buy button */
.merchant-row__right {
    flex-shrink: 0;
}

.btn-merchant-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
    background: var(--accent);
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 36px;
}

.btn-merchant-buy:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-merchant-buy--amazon {
    background: #ff9900;
    color: #000;
}

.btn-merchant-buy--amazon:hover {
    background: #e68a00;
}

.btn-merchant-buy svg {
    width: 14px;
    height: 14px;
}

/* No offers state */
.product-details-modal__no-offers {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Affiliate notice */
.product-details-modal__affiliate-notice {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* Mobile: Stack merchant rows */
@media (max-width: 640px) {
    .merchants-table-header {
        display: none;
    }

    .merchant-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .merchant-row__left {
        flex-wrap: wrap;
    }

    .merchant-row__info {
        flex: 1 1 calc(100% - 56px);
    }

    /* EAN Dropdown - Mobile: full width, larger touch target, no rounded edges */
    .merchant-row__ean-dropdown {
        width: 100%;
        max-width: none;
        padding: 0.625rem 2rem 0.625rem 0.75rem;
        font-size: 0.875rem;
        min-height: 44px;
        margin-top: 0.5rem;
        background-position: right 0.75rem center;
        background-size: 14px;
        border-radius: 0 !important;
        -webkit-border-radius: 0 !important;
    }

    .merchant-row__center {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }

    .merchant-row__price-group {
        align-items: flex-start;
    }

    .merchant-row__right {
        width: 100%;
    }

    .btn-merchant-buy {
        width: 100%;
        padding: 0.75rem 1rem;
        min-height: 44px;
        font-size: 0.9375rem;
    }
}

/* ============================================
   VARIANT SELECTOR (Modal)
   ============================================ */

.variant-selector--modal {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.variant-selector__header {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--accent);
}

.variant-selector__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-primary);
}

/* Collapsed state button */
.variant-selector__current {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.variant-selector__current:hover {
    background: var(--bg-hover);
}

.variant-selector__current-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.variant-selector__current-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: var(--bg-tertiary);
    border-radius: 4px;
    flex-shrink: 0;
}

.variant-selector__current-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    text-align: left;
}

.variant-selector__current-label {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.variant-selector__current-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.variant-selector__chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.variant-selector__current[aria-expanded="true"] .variant-selector__chevron {
    transform: rotate(180deg);
}

/* Expanded state */
.variant-selector__expanded {
    background: var(--bg-secondary);
}

.variant-selector__list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.variant-selector__list-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.variant-selector__collapse-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease;
}

.variant-selector__collapse-btn:hover {
    color: var(--text-primary);
}

.variant-selector__collapse-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Variant list */
.variant-selector__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
}

/* Individual variant card - 3-column grid layout */
.variant-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
    margin-bottom: 0.5rem;
}

.variant-card:last-child {
    margin-bottom: 0;
}

.variant-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html.dark .variant-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.variant-card--active {
    border-color: var(--accent);
    border-left-width: 3px;
    background: var(--bg-primary);
}

.variant-card__image {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.variant-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.variant-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.variant-card__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.variant-card__label-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.variant-card__label {
    color: var(--text-muted);
}

.variant-card__value {
    color: var(--accent);
    font-weight: 600;
}

.variant-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.variant-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #000;
    background: var(--accent);
    border-radius: 4px;
    white-space: nowrap;
}

.variant-card__price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Mobile: Larger touch targets */
@media (max-width: 640px) {
    .variant-selector--modal {
        margin-top: 0.75rem;
    }

    .variant-selector__header {
        padding: 0.625rem 0.75rem;
    }

    .variant-selector__current {
        padding: 0.75rem;
        min-height: 56px;
    }

    .variant-selector__current-img {
        width: 40px;
        height: 40px;
    }

    .variant-selector__current-info {
        gap: 0.125rem;
    }

    .variant-selector__current-label {
        font-size: 0.625rem;
    }

    .variant-selector__current-value {
        font-size: 0.8rem;
    }

    .variant-selector__list {
        padding: 0.75rem;
        gap: 0.375rem;
    }

    .variant-card {
        grid-template-columns: 36px 1fr auto;
        gap: 0.625rem;
        padding: 0.5rem 0.625rem;
        border-radius: 6px;
        margin-bottom: 0.375rem;
    }

    .variant-card__image {
        width: 36px;
        height: 36px;
    }

    .variant-card__name {
        font-size: 0.8rem;
    }

    .variant-card__label-value {
        font-size: 0.7rem;
    }

    .variant-card__badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }

    .variant-card__price {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .variant-selector__current-img,
    .variant-card__image {
        width: 32px;
        height: 32px;
    }

    .variant-card {
        grid-template-columns: 32px 1fr auto;
    }

    .variant-card__name {
        font-size: 0.75rem;
        white-space: normal;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }

    .variant-card__right {
        min-width: auto;
    }
}
