* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #00a82d;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.search-bar {
    display: flex;
    width: 50%;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-bar button {
    padding: 10px 15px;
    border: none;
    background-color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.user-actions button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    position: relative;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
}

main {
    padding: 20px 5%;
    margin-left: -15px;
}

.categories {
    margin-bottom: 20px;
}

.categories h2 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.category-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background-color: #e0e0e0;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9rem;
}
.category-btn img {
    width: 81px;
    height: 118px;
    object-fit: cover;
    margin-bottom: 8px; 
    border-radius: 9%;
}


.category-btn.active {
    background-color: #00a82d;
    color: white;
}
.p-producucts h2 {
    padding: 0 0% 20px;
}

.products {
    display: grid;
    /* flex-direction: column; */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    overflow-x: auto;
}

/* Product Card: Always horizontal (desktop + mobile) */
.product-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 40px;
    background: #f9f9f9;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 150px;
    height: 150px;
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* Optional: wrap on smaller screens */
}

/* Details inside product card */

.product-name,
.product-price,
.product-description,
.price-type,
.quantity-buttons {
  margin: 0;
}




.product-name {
    font-weight:bold;
    margin-bottom: 5px;
    min-width: 100px;
   
}

.product-price {
    color: #00a82d;
    font-weight: 700;
    margin-bottom: 10px;
    flex-direction: row;
}

.price-type {
  /* Your styles here */
  background-color: #f0f0f0;
  border-radius: 5px;
  padding: 5px;
  margin-right: 105px;
}


.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: none;
    background-color: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-to-cart {
    padding: 5px 10px;
    background-color: #00a82d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: flex-end;
    z-index: 1000;
}

.cart-modal {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
}

.cart-item-details h4 {
    margin-bottom: 5px;
}

.cart-item-details p {
    color: #00a82d;
    font-weight: 700;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-item {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
}

.cart-total {
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.cart-total p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

#checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #00a82d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .search-bar {
        width: 100%;
    }

    .cart-modal {
        max-width: 100%;
    }
}

/* Form input fields */
.user-info input,
.user-info textarea {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    margin-bottom: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Quantity inputs */
.quantity-input-wrapper input.quantity-input {
    width: 60px;
    padding: 4px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.qty-minus, .qty-plus {
    width: 30px;
    height: 30px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qty-display {
    width: 24px;
    text-align: center;
    font-weight: bold;
}

#imageModal {
  transition: opacity 0.3s ease;
}
#closeModal:hover {
  color: #ff4444;
  transform: scale(1.1);
}


