/* Admin Produk Styles */
.product-image-preview {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin-bottom: 10px;
}

.admin-form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

.admin-table td, .admin-table th {
    vertical-align: middle;
}

/* Admin Styles */
.admin-section {
    padding: 2rem 0;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th, 
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background-color: var(--primary);
    color: white;
}

.admin-table tr:hover {
    background-color: #f5f5f5;
}

.admin-detail-container {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.customer-info, .order-details {
    margin-bottom: 2rem;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.order-items-table th, 
.order-items-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.order-items-table th {
    background-color: #f2f2f2;
}

.admin-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.complete-btn {
    background-color: #28a745;
    color: white;
}

.complete-btn:hover {
    background-color: #218838;
}

.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Style untuk cetakan */
@media print {
    body * {
        visibility: hidden;
    }
    .print-area, .print-area * {
        visibility: visible;
    }
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
    table {
        width: 100%;
        border-collapse: collapse;
    }
    th, td {
        border: 1px solid #000;
        padding: 5px;
    }
    .print-header {
        text-align: center;
        margin-bottom: 20px;
    }
    .print-footer {
        text-align: center;
        margin-top: 20px;
        font-style: italic;
    }
}

/* Tambahan CSS untuk fitur keranjang */

/* Tombol Keranjang */
.keranjang-btn {
    position: relative;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--accent);
    color: var(--dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Form Tambah ke Keranjang */
.add-to-cart-form {
    margin-top: 1rem;
}

.quantity {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.quantity button {
    background-color: var(--secondary);
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: white;
}

.quantity input {
    width: 50px;
    text-align: center;
    margin: 0 5px;
    height: 30px;
    border: 1px solid #ddd;
}

/* Halaman Keranjang */
.cart-section {
    padding: 5rem 0;
}

.empty-cart {
    text-align: center;
    padding: 3rem 0;
}

.empty-cart i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-cart p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart-item-img {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 5px;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h3 {
    margin-bottom: 0.5rem;
}

.update-form, .remove-form {
    display: inline-block;
    margin-right: 0.5rem;
}

.update-btn, .remove-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.update-btn {
    background-color: var(--secondary);
    color: white;
}

.remove-btn {
    background-color: #f8d7da;
    color: #721c24;
}

.cart-item-subtotal {
    text-align: right;
    font-weight: bold;
}

.cart-summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-weight: bold;
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    margin-top: 1.5rem;
}

/* Halaman Checkout */
.checkout-section {
    padding: 5rem 0;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.checkout-form {
    background-color: white;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.order-summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #eee;
}

.order-totals {
    margin-top: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.grand-total {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Halaman Selesai */
.order-complete {
    padding: 5rem 0;
    text-align: center;
}

.complete-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 3rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.icon-success {
    font-size: 5rem;
    color: #28a745;
    margin-bottom: 1.5rem;
}

.order-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .cart-container, .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    
    .cart-item-subtotal {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px dashed #eee;
    }
}