/* General Button Styles */
button, .add-to-cart, .add-to-cart-confirm {
    background-color: #007bff;
    border: 1px solid #ccc;
    color: white;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center;
}

button:hover, .add-to-cart:hover, .add-to-cart-confirm:hover {
    background-color: #0056b3;
}

/* Item-tags Style */
.item-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 20px;
    position: relative;
}

.item-tags a, #more-tags {
    font-size: 16px;
    color: #007bff;
    text-decoration: none;
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 10px 15px;
    flex: 1; /* Equal width for all links */
    text-align: center;
    margin: 0 5px;
}

.item-tags a:hover, #more-tags:hover {
    background-color: #e0e0e0;
}

/* Item-tags Tooltip Styles */
.tooltip {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 80%;
    max-width: 400px;
    overflow: auto;
}

.tooltip a {
    font-size: 14px;
    display: block;
    margin: 5px 0;
    color: #007bff;
    text-decoration: none;
}

.tooltip a:hover {
    text-decoration: underline;
}

.tooltip-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Item-list Style */
.item-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

.item-card {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
    position: relative;
}

.item-image {
    flex: 0 0 90px;
    height: 90px;
    margin-right: 10px;
}

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

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.item-price {
    color: red;
    font-size: 16px;
    font-weight: bold;
}

/* Add-to-cart Button Specific */
.add-to-cart {
    flex: 0 0 60px;
    align-self: center;
    padding: 6px 12px;
}

/* Add to Cart Modal Styling */
.cart-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: white;
    z-index: 1000;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

.cart-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

.cart-modal-header h2 {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
}

.cart-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;  /* Center align the contents */
    justify-content: space-between;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    margin: 10px 0;  /* Reduced margin */
    width: 150px;  /* Make the width narrower */
    margin-bottom: 10px;  /* Reduced bottom margin to bring it closer to price-info */
}

.quantity-selector button {
    border: 1px solid #ccc;
    padding: 5px;
    font-size: 18px;
    width: 30px;  /* Reduced button width */
    height: 30px;  /* Reduced button height */
    cursor: pointer;
}

.quantity-selector input {
    text-align: center;
    font-size: 16px;  /* Slightly smaller font */
    border: none;
    width: 40px;
}

/* Align price-info and total-price */
.price-info {
    text-align: left;
    font-size: 14px;
    color: #777;
    margin-top: 10px;  /* Adjust the margin for proper spacing */
}

.total-price {
    text-align: right;
    font-size: 14px;
    color: #777;
    margin-top: 10px;  /* Adjust the margin for proper spacing */
}

.cart-modal-footer {
    display: flex;
    justify-content: center;
}

.add-to-cart-confirm {
    background-color: red;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 150px;  /* Make the button width narrower */
    border-radius: 4px;
    margin-bottom: 30px;
}

.cart-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}


/* Item Listing Thumbnail Modal Style */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Footer style */
#footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #333;
    color: white;
    position: fixed;
    bottom: 0;
    width: 95%;
}

#footer a {
    font-size: 18px;
    color: white;
    text-decoration: none;
    display: inline-block;
}

#footer a:hover {
    color: #007bff;
}