/* Professional POS Layout */

/* Full Screen Layout */
.pos-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f8fafc;
}

/* Left Side - Products (60%) */
.pos-left {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    background: white;
    border-right: 2px solid #e2e8f0;
}

/* Right Side - Cart & Checkout (40%) */
.pos-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

/* Header Bar */
.pos-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Search Bar */
.pos-search {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.pos-search input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.pos-search input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

/* Products Grid */
.pos-products {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.pos-product-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.pos-product-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.pos-product-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.pos-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

/* Cart Section */
.pos-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    margin: 1rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pos-cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.pos-cart-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-cart-item-info {
    flex: 1;
}

.pos-cart-item-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.pos-cart-item-price {
    font-size: 0.9rem;
    color: #64748b;
}

.pos-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.pos-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #667eea;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.pos-qty-btn:hover {
    background: #5568d3;
}

.pos-qty-input {
    width: 50px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.25rem;
}

.pos-cart-item-total {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.pos-remove-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 0.5rem;
}

.pos-remove-btn:hover {
    background: #fecaca;
}

/* Cart Totals */
.pos-cart-totals {
    padding: 1.5rem;
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.pos-total-final {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 2px solid #e2e8f0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

/* Action Buttons */
.pos-actions {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pos-btn {
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    grid-column: 1 / -1;
}

.pos-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.pos-btn-secondary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.pos-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.pos-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.pos-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.pos-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.pos-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Customer & Payment */
.pos-customer {
    padding: 1rem;
    background: white;
    margin: 0 1rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pos-customer select,
.pos-customer input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Scrollbar */
.pos-products::-webkit-scrollbar,
.pos-cart-items::-webkit-scrollbar {
    width: 8px;
}

.pos-products::-webkit-scrollbar-track,
.pos-cart-items::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.pos-products::-webkit-scrollbar-thumb,
.pos-cart-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.pos-products::-webkit-scrollbar-thumb:hover,
.pos-cart-items::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 1024px) {
    .pos-container {
        flex-direction: column;
    }
    
    .pos-left, .pos-right {
        flex: 1;
    }
    
    .pos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}