/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.search-container {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    background-color: #34495e;
}

#searchInput {
    padding: 0.8rem 1rem;
    width: 60%;
    max-width: 500px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

#searchButton {
    padding: 0.8rem 1.5rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#searchButton:hover {
    background-color: #c0392b;
}

.product-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    background-color: #ecf0f1;
}

.category-btn {
    padding: 0.6rem 1.2rem;
    margin: 0.3rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.category-btn:hover {
    background-color: #2980b9;
}

.category-btn.active {
    background-color: #e74c3c;
}

main {
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.products-container {
    flex: 3;
    min-width: 300px;
    margin-right: 2rem;
}

.product-section {
    margin-bottom: 2.5rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.note {
    font-style: italic;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1.2rem;
    border: 1px solid #ddd;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-price {
    color: #e74c3c;
    font-weight: bold;
    margin: 0.8rem 0;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-quantity {
    width: 60px;
    padding: 0.3rem;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-to-cart {
    padding: 0.5rem 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #219653;
}

.cart-container {
    flex: 1;
    min-width: 300px;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-container h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 2;
}

.cart-item-title {
    font-weight: bold;
}

.cart-item-price {
    color: #e74c3c;
    font-size: 0.9rem;
}

.cart-item-quantity {
    flex: 1;
    text-align: center;
}

.cart-item-remove {
    color: #e74c3c;
    cursor: pointer;
    font-weight: bold;
    margin-left: 1rem;
}

.cart-total {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #ecf0f1;
    text-align: right;
    font-weight: bold;
    font-size: 1.1rem;
}

#checkout-btn {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#checkout-btn:hover {
    background-color: #c0392b;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.order-summary {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.total {
    font-weight: bold;
    margin-top: 1rem;
    text-align: right;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #2c3e50;
    color: white;
    margin-top: 2rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .products-container {
        margin-right: 0;
        margin-bottom: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.whatsapp-btn i {
    font-size: 20px;
}

