* {
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #f4f4f5;
    min-height: 100vh;
    padding: 20px 30px;

}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background-color: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    margin: 0 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header h1 {
    color: #18181b;
    font-size: 30px;
}

.header a {
    color: #18181b;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.header a:hover {
    background-color: #e4e4e7;
    padding: 8px 12px;
    border-radius: 8px;

}

#cart-btn {
    background-color: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

#cart-btn:hover {
    background-color: #115e59;
    padding: 8px 12px;
}

#search-input {
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 12px;
    margin: 30px 24px;
    width: 50%;
}

#category-filter {
    display: flex;
    gap: 8px;
    padding: 0 24px;
}

.button {
    background-color: rgb(236, 155, 5);
    border-radius: 999px;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: bold;
}

.button:hover {
    background-color: rgb(226, 175, 78);
}

#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 40px 24px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    padding: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    background-color: #e4e4e7;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.product-name {
    color: #18181b;
    font-size: 20px;
}

.product-price {
    color: #0f766e;
    font-size: 14px;
    font-weight: bold;
}

.add-btn {
    background-color: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
}

.add-btn:hover {
    background-color: #115e59
}

.cart-wrapper {
    position: relative;
}

.cart-panel {
    position: absolute;
    top: calc(100%);
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    padding: 16px;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

#product-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.added-details {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #e4e4e7;
}

.name-in-cart {
    flex: 1;
    margin: 0;
    font-size: 14px;
    color: #18181b;
}

.quantity-in-cart,
.subtotal-in-cart {
    margin: 0;
    font-size: 13px;
    color: #71717a;
}

.btn {
    width: 26px;
    height: 26px;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
}

.btn:hover {
    background: #f4f4f5;
}

.remove-btn {
    border: none;
    background: none;
    color: #71717a;
    font-size: 12px;
    cursor: pointer;
}

#total {
    margin: 12px 0 0;
    font-weight: bold;
    color: #18181b;
}

#modal-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

#modal-name {
    margin: 16px 0 8px;
    font-size: 22px;
    color: #18181b;
}

#modal-price {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: bold;
    color: #0f766e;
}

#modal-category,
#modal-stock {
    margin: 0 0 4px;
    font-size: 13px;
    color: #71717a;
}

#modal-description {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #18181b;
}

#close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgb(198, 8, 8);
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    color: white;
}

#close-btn:hover {
    background: rgb(242, 72, 72);
}

.hidden {
    display: none !important;
}

.container {
    display: flex;
    gap: 10px;
    margin: 16px 24px;
}

.card {
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    width: 50%;
}

.add {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px;
    max-height: 500px;
}

.add input,
.add textarea {
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 12px;
    width: 100%;
}

#product-description {
    resize: vertical;
    min-height: 80px;
}

#btn-add {
    background-color: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
}

#btn-add:hover {
    background-color: #115e59
}

#image-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e4e4e7;
}

#product-list {
    padding-left: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.added-list {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e4e4e7;
}

.details-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-card {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.added-name {
    color: #18181b;
    font-size: 16px;
    margin: 0;
    flex-shrink: 0;
    width: 200px;
}

.details-card p {
    color: #18181b;
    font-size: 16px;
    margin: 0 0 4px;
}

.details-card img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

#image-preview:not([src]),
#image-preview[src=""] {
    display: none;
}

.edit-btn {
    background-color: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
}

.edit-btn:hover {
    background-color: #115e59
}

.remove-btn {
    background-color: #b91c1c;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    margin-left: 4px;
    margin-right: 4px;
}

.remove-btn:hover {
    background-color: rgb(242, 72, 72);
}
