/**
 * Stylesheet: KRS Public Restaurant Products & Step 4 ("Carta y Consumos")
 *
 * Touch UI / Soft UI styling for dedicated Step 4 and Step 5 summary.
 *
 * Strictly follows AGENTS.md:
 * - Zero inline styles
 * - Soft UI / Neumorphism (border-radius: 12px-20px, subtle shadows)
 * - Touch targets >= 44px
 * - Official palette (#2D1A68, #1BA59D, #C05A86, #403A60)
 *
 * @package KUADSystem
 */

@import url('krs-public-restaurant-catalog-modal.css');

/* ===== STEP 4 DEDICATED PANE (CARTA Y CONSUMOS) ===== */
.krs-products-step-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.krs-products-hero-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(45, 26, 104, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.krs-products-hero-icon {
    font-size: 42px;
    line-height: 1;
}

.krs-products-hero-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #2D1A68;
}

.krs-products-hero-desc {
    margin: 0;
    font-size: 15px;
    color: #64748b;
    max-width: 540px;
    line-height: 1.5;
}

.krs-products-hero-btn {
    min-height: 52px;
    height: 52px;
    padding: 0 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(27, 165, 157, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.krs-products-hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(27, 165, 157, 0.45);
}

.krs-products-empty-hint {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

/* Attached Items Table in Step 4 */
.krs-products-attached-wrap {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(45, 26, 104, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.krs-products-attached-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #f1f5f9;
}

.krs-products-attached-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #2D1A68;
    display: flex;
    align-items: center;
    gap: 8px;
}

.krs-products-attached-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.krs-product-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.krs-product-row-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.krs-product-row-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
}

.krs-product-row-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    font-size: 20px;
}

.krs-product-row-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.krs-product-row-unit-price {
    font-size: 13px;
    color: #64748b;
    margin-left: 6px;
}

.krs-product-row-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.krs-product-row-actions .krs-catalog-stepper {
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1.5px solid #1BA59D !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 6px rgba(27, 165, 157, 0.15) !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.krs-product-row-actions button.krs-catalog-step-btn,
.krs-product-row-actions .krs-catalog-step-btn {
    width: 38px !important;
    min-width: 36px !important;
    max-width: 38px !important;
    height: 100% !important;
    min-height: 36px !important;
    max-height: 38px !important;
    background: #1BA59D !important;
    background-color: #1BA59D !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.krs-product-row-actions button.krs-catalog-step-btn:hover,
.krs-product-row-actions .krs-catalog-step-btn:hover {
    background: #158079 !important;
    background-color: #158079 !important;
    color: #ffffff !important;
}

.krs-product-row-actions button.krs-catalog-step-btn:active,
.krs-product-row-actions .krs-catalog-step-btn:active {
    transform: scale(0.92) !important;
}

.krs-product-row-actions .krs-catalog-step-val {
    flex: 1 1 auto !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    padding: 0 4px !important;
    user-select: none !important;
    line-height: 38px !important;
    height: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

.krs-product-row-total {
    font-size: 15px;
    font-weight: 800;
    color: #2D1A68;
    min-width: 75px;
    text-align: right;
}

.krs-product-row-del-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
}

.krs-product-row-del-btn:hover {
    color: #B55C80;
    background: #fdf2f8;
}

.krs-products-attached-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 14px;
    border-top: 1.5px solid #f1f5f9;
}

.krs-products-subtotal-badge {
    font-size: 16px;
    color: #334155;
    font-weight: 600;
}

.krs-products-subtotal-badge strong {
    font-size: 19px;
    font-weight: 800;
    color: #1BA59D;
}

.krs-btn-reopen-catalog {
    min-height: 42px;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Summary item in Step 5 */
.krs-summary-products-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.krs-summary-product-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #475569;
}

/* Responsive Breakpoints for Step 4 */
@media (max-width: 768px) {
    .krs-product-row-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .krs-product-row-actions {
        width: 100%;
        justify-content: space-between;
    }
}
