
/* ========================================
   SALES CONTAINER
======================================== */

.sales-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    color: var(--text);
}

/* ========================================
   SALES HEADER
======================================== */

.sales-header {
    margin-bottom: 24px;
}

.sales-header h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
}

.sales-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ========================================
   SALES LAYOUT
======================================== */

.sales-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: start;
}

.sales-section {
    min-width: 0;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.sales-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.sales-section-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.sales-cart-count {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   PRODUCT LIST
======================================== */

.sales-product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sales-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.sales-product-card:hover {
    background: var(--background);
}

.sales-product-info {
    min-width: 0;
}

.sales-product-info h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.sales-product-info p {
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.sales-product-price {
    color: var(--primary) !important;
    font-weight: 700;
}

/* ========================================
   SALES BUTTONS
======================================== */

.sales-add-button,
.sales-checkout-button,
.sales-clear-button,
.sales-remove-button {
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sales-add-button {
    flex-shrink: 0;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--primary);
    font-size: 13px;
}

.sales-add-button:hover,
.sales-checkout-button:hover {
    background: var(--primary-hover);
}

.sales-remove-button {
    padding: 7px 12px;
    color: #dc2626;
    background: #fee2e2;
    font-size: 12px;
}

.sales-remove-button:hover {
    background: #fecaca;
}

.sales-clear-button {
    padding: 11px 16px;
    color: var(--text);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 13px;
}

.sales-clear-button:hover {
    background: var(--border);
}

.sales-checkout-button {
    padding: 12px 18px;
    color: #ffffff;
    background: var(--primary);
    font-size: 14px;
}

.sales-checkout-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   SALES CART
======================================== */

.sales-cart {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sales-cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sales-cart-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sales-cart-item-info {
    margin-bottom: 16px;
}

.sales-cart-item-info h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.sales-cart-item-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.sales-cart-item-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sales-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.sales-form-group label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.sales-form-group input {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.sales-form-group input:focus {
    border-color: var(--primary);
}

.sales-cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.sales-cart-item-footer strong {
    color: var(--primary);
    font-size: 14px;
}

/* ========================================
   CART SUMMARY
======================================== */

.sales-cart-summary {
    padding: 18px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sales-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.sales-summary-row strong {
    color: var(--text);
}

.sales-total-row {
    margin-bottom: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
}

.sales-total-row strong {
    color: var(--primary);
    font-size: 21px;
}

.sales-cart-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.sales-cart-actions button {
    flex: 1;
}

/* ========================================
   EMPTY STATE
======================================== */

.sales-empty {
    padding: 30px 18px;
    color: var(--text-muted);
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   SALES MESSAGE
======================================== */

.sales-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.sales-message-info {
    color: var(--text);
    background: var(--background);
}

.sales-message-success {
    color: #15803d;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.sales-message-error {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}

/* ========================================
   RESPONSIVE - TABLET
======================================== */

@media (max-width: 1000px) {
    .sales-layout {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
======================================== */

@media (max-width: 600px) {
    .sales-container {
        padding: 14px;
    }

    .sales-header h2 {
        font-size: 22px;
    }

    .sales-section {
        padding: 16px;
    }

    .sales-section-header h3 {
        font-size: 17px;
    }

    .sales-product-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .sales-add-button {
        width: 100%;
    }

    .sales-cart-item-fields {
        grid-template-columns: 1fr;
    }

    .sales-cart-item-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .sales-remove-button {
        width: 100%;
    }

    .sales-cart-actions {
        flex-direction: column;
    }

    .sales-cart-actions button {
        width: 100%;
    }
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
    .sales-product-card,
    .sales-add-button,
    .sales-checkout-button,
    .sales-clear-button,
    .sales-remove-button {
        transition: none;
    }
}
