.bop-debug-banner {
    margin: 1rem 0 0;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: #fff5d6;
    color: #704f00;
    font-size: 0.95rem;
}

.bop-hidden-row,
.bop-hidden-native {
    display: none !important;
}

.bop-matrix-shell {
    margin-top: 1.25rem;
}

.bop-matrix-heading {
    margin-bottom: 0.75rem;
}

.bop-matrix-status {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.bop-size-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.bop-size-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem 0.6rem;
    border: 1px solid #454b59;
    border-radius: 16px;
    background: #313543;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.bop-size-card.is-active {
    border-color: #5b6272;
}

.bop-size-card.is-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.bop-size-card.is-disabled {
    opacity: 0.68;
    box-shadow: none;
}

.bop-size-card.is-disabled::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, transparent 46%, rgba(177, 33, 52, 0.16) 47%, rgba(177, 33, 52, 0.16) 53%, transparent 54%);
    pointer-events: none;
}

.bop-size-card.is-disabled.is-out {
    border-color: #f0b5be;
    background: linear-gradient(180deg, #353742 0%, #30262b 100%);
}

.bop-size-label {
    display: block;
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    color: #f1f3f7;
}

.bop-size-meta {
    color: #7a8594;
    font-size: 0.78rem;
    text-align: center;
    margin-top: 0.2rem;
}

.bop-size-meta:empty {
    display: none;
}

.bop-input-shell {
    margin-top: auto;
    display: block;
}

.bop-matrix-wrapper {
    margin-bottom: 1rem;
}

.single-product .summary .bop-size-card input[type="number"] {
    width: 100%;
    padding: 0.45rem 0.5rem;
    border: 2px solid #4b4f66;
    border-radius: 12px;
    background-color: #8b8a98 !important;
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    box-shadow: none !important;
}

.single-product .summary .bop-size-card input[type="number"]:focus {
    outline: none;
    border-color: #25a244;
    background-color: #8b8a98 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.single-product .summary .bop-size-card.is-disabled input[type="number"] {
    background-color: #6d6f7b !important;
    color: #d2d5dc !important;
    cursor: not-allowed;
}

.bop-form-error {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #fde7e9;
    color: #9a2330;
}

.bop-submit-button {
    margin-top: 1.5rem;
    min-width: 260px;
    min-height: 52px;
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.bop-submit-button.is-full-width {
    width: 100%;
    min-width: 0;
}

@media (max-width: 640px) {
    .bop-size-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Debug panel */
.bop-debug-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 2px dashed #0073aa;
    border-radius: 12px;
    background: #1e2130;
    color: #c8ccd4;
    font-size: 0.82rem;
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
}

.bop-debug-panel summary {
    cursor: pointer;
    color: #5bc0de;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.bop-debug-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2e3248;
}

.bop-debug-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.bop-debug-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.2rem 0;
    flex-wrap: wrap;
}

.bop-debug-label {
    color: #8899aa;
    white-space: nowrap;
}

.bop-debug-filters {
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
    color: #a3be8c;
    font-size: 0.78rem;
}

.bop-debug-payload {
    margin: 0.25rem 0 0;
    padding: 0.5rem;
    border-radius: 6px;
    background: #161825;
    color: #ebcb8b;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}
