body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.store-header {
    position: relative;
    text-align: center;
    overflow: hidden;
    height: 157px; /* Adjust height as needed */
}

.header-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.header-content {
	    position: absolute;
	    top: 2px;
	    left: 4px;
	    z-index: 2;
	    background: rgba(0, 0, 0, 0.5);
	    color: white;
	    height: 95%;
	    width: 97%;
	    display: flex;
	    flex-direction: column;
	    justify-content: center;
	    align-items: center;
	    border-style: ridge;
	    border-color: #166fab;
	    border-radius: 15px;
    }

.shop-name {
    margin: 3px 2px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.status-container {
    margin-top: 8px;
    width: 360px;
    align-items: center;
    display: flex;
    height: 50px;
    margin-left: 90px;
}

.status-button {
    padding: 3px 8px;
/*    border: none; */
    border-width: 4px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    font-weight: bold; 
}

.status-open {
    background-color: #4CAF50;
    color: white;
}

.status-closed {
    background-color: #f44336;
    color: white;
}

.status-temporarily-closed {
    background-color: #ff9800;
    color: white;
}

.status-box {
    font-size: 0.9rem;
    color: #fffefe;
    background: #4CAF50;
    border-radius: 10px;
    margin-left: 50px;
    border: 4px;
    border-style: ridge;
    border-color: #a4a4a4;
}
.contact-btn {
    padding: 0.5rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.phone-btn { background-color: blue; color: white; }
.whatsapp-btn { background-color: #25D366; color: white; }
.location-btn { background-color: #f70101; color: white; }

.icon-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.30rem;
    color: white;
    text-decoration: none;
}
.header-icons {
    display: flex;
    gap: 25px;
    position: absolute;
    right: 15px;
    top: 70px;
}

.icon {
    color: white;
    text-decoration: none;
    font-size: 24px;
    transition: opacity 0.3s;
}

.icon:hover {
    opacity: 0.8;
}

.form-container {
    max-width: 1200px;
    margin: 2px auto;
    padding: 2px;
    background-color: #4a6b77;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    /* Added for floating footer */
    padding-bottom: 80px; /* Space for the fixed total/checkout bar */
}

.products-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
    padding: 10px;
    height: 120px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-image {
    flex: 0 0 100px;
    height: 100%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.product-image img {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    margin-bottom: 0px;
}

.product-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: -12px;
    margin-top: 0px;
    color: #333;
}

.product-price {
    font-size: 1rem;
    font-weight: bold;
    color: #95153d;
    margin-bottom: -10px;
}
.product-info {
    display: flex; /* Makes the container a flex container */
    align-items: center; /* Vertically aligns items in the middle */
    gap: 15px; /* Adds space between the price and stock elements */
}
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #5355da;
    color: white;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:active {
    transform: scale(0.95);
    background: #45a049;
}

.quantity-input {
    width: 30px;
    height: 20px;
    text-align: center;
    padding: 5px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: bold;
    -webkit-appearance: none;
    margin: 0 5px;
}
.available-stock
{
    color: green;
    font-size: small;
}


.out-of-stock {
    color: red;
    font-size: small;
}

.total-section {
    text-align: right;
    margin: 0; /* Changed from 20px 10px to 0 for floating bar */
    font-size: 1.6rem;
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
    color: #0b17af;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-weight: bold;
}

.form-group input {
    width: 80%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Original submit button style - will be hidden */
button[type="submit"] {
    background-color: #1021ed;
    color: white;
    padding: 5px 20px;
    border: none;
    border-radius: 4px;
    margin-left: 60px;
    cursor: pointer;
    border-radius: 10px;
    width: 48%;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s;
    font-family: 'Merriweather', serif;
}

button[type="submit"]:hover {
    background-color: #45a049;
}

.success-message {
    color: #4CAF50;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #4CAF50;
    border-radius: 4px;
}

.shop-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

/* New: Styles for disabled fields */
.disabled-field {
    opacity: 0.7;
    cursor: not-allowed;
}

/* New: Search container styles */
.search-container {
    margin: 15px 10px;
    display: flex;
    gap: 10px;
}

.search-box {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    background-color: #f8f8f8;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.search-button {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
}

.search-button:hover {
    background-color: #2980b9;
}

.no-results {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #777;
}

/* --- Floating Total and Checkout Button Styles (New Additions) --- */

.total-section-container { /* New container for total and button */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #3b414b; /* Match your modal/header background for consistency */
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between; /* To align total on left and button on right */
    align-items: center;
    z-index: 999; /* Ensure it stays above other content but below modals */
    color: white;
    font-size: 1.2em;
    font-weight: bold;
}

.total-section-container button[type="submit"] {
    /* Style for the checkout button within the new container, overriding the general button[type="submit"] */
    padding: 10px 20px;
    background-color: #28a745; /* A suitable color for a checkout button */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto; /* Override 100% width from general submit button */
}

.total-section-container button[type="submit"]:hover {
    background-color: #218838;
}

/* Ensure the disabled styles are applied to the new button */
.total-section-container button[type="submit"]:disabled,
.total-section-container button[type="submit"].disabled-field {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #6c757d; /* A grayed-out color for disabled */
}

/* Hide the original submit button to avoid duplicates.
   This targets direct child buttons of the form. */
form > button[type="submit"] {
    display: none;
}
/* --- End Floating Total and Checkout Button Styles --- */


/* Small screen layout (phones ≤ 480px) */
@media (max-width: 480px) {
    .product-card {
        flex-direction: row;
        height: auto;
        padding: 8px;
    }

    .product-image {
        flex: 0 0 50px;
    }

    .product-title {
        font-size: 1.0rem;
    }

    .product-price {
        font-size: 1.0rem;
        margin-bottom: 12px;
    }

    .quantity-btn {
        font-size: 0.85rem;
        padding: 4px 8px;
    }

    .quantity-input {
        width: 20px;
        padding: 4px;
        font-size: 0.85rem;
    }

    header {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
    }

    .header-icons {
        position: static;
        justify-content: center;
        margin-top: 12px;
	margin-bottom: 16px;
        gap: 25px;	
    }

          .shop-name {
	    font-size: 1.4rem;
	    font-family: 'Times New Roman', Times, serif;
	    background-color: #2b2e31;
	    border-width: 6px;
	    border-radius: 4px;
	    border-style: outset;
	    margin-top:20px;
	    width: 75%;
	   }

    /* This will apply to the floating button as well due to specificity,
       but the overall floating container manages its size and position */
    .total-section-container button[type="submit"] {
        font-size: 1rem;
        padding: 12px;
    }

    .total-section {
        font-size: 1.3rem;
        /* text-align: center; */ /* Removed as flexbox handles alignment in new container */
    }

    /* Adjust padding for smaller screens if necessary for the fixed footer */
    .form-container {
        padding-bottom: 50px; /* Slightly more padding for smaller screens if needed */
    }
}
 /* Add styles for the details modal */
        .details-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        
	.modal-content {
	  background-color: #ffffff;
	  padding: 15px;
	  border-radius: 5px;
	  width: 600px;
	  overflow-y: auto;
	  position: relative;
	  max-height: 80vh;
	  overflow: auto;
				}
	
	.modal-close {
	           position: absolute;
	       top: 2px;
        right: 8px;
    font-size: 30px;
    cursor: pointer;
    color: white;
    background-color: #2e3057;
    border-radius: 10px;
}     
        .modal-close:hover {
            color: #333;
        }

       .details-content {
	           line-height: 1.5;
		       padding: 0px;
		           white-space: pre-line;
			       font-family: 'Noto Sans Malayalam', sans-serif;
			           font-weight: bold;
				       color: #000000;
			       }
        .details-button {
            display: inline-block;
            width: 70px;
            margin-top: 20px;
            padding: 5px 10px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

        .details-button:hover {
            background-color: #2980b9;
        }

        .shop-message {
            background-color: #ffcccb;
            color: #d8000c;
            padding: 15px;
            text-align: center;
            font-size: 1.1em;
            font-weight: bold;
            margin: 10px 0;
            border-radius: 5px;
        }

        .disabled-field {
            opacity: 0.7;
            cursor: not-allowed;
        }

        /* Search container styles */
        .search-container {
            margin: 15px 10px;
            display: flex;
            gap: 10px;
        }

        .search-box {
            flex: 1;
            padding: 12px 15px;
            border: 2px solid #ddd;
            border-radius: 30px;
            font-size: 16px;
            background-color: #f8f8f8;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        }

        .search-button {
            padding: 12px 20px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            font-weight: bold;
        }

        .search-button:hover {
            background-color: #2980b9;
        }

        .no-results {
            text-align: center;
            padding: 20px;
            font-size: 18px;
            color: #777;
        }
.floating-total {
    position: fixed;
    bottom: 20px;
    left: 10px;
    right: 10px;
    background: #06903a;
    color: white;
    padding: 4px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: auto;
    max-width: calc(100% - 20px);
    height: auto;
}

.total-amount {
    font-family: 'Arial', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: white;
  }
.checkout-btn {
    background: #128C7E;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

        /* NEW STYLES FOR PRODUCT HEADER SECTION */
        .product-header {
            width: 100%;
            margin-bottom: 8px;
            border-bottom: 1px solid #ddd;
            padding-bottom: 13px;
        }

        .product-title {
            font-family: 'Times New Roman', Times, serif;
            font-size: 1.1rem;
            font-weight: 600;
            margin: -15px;
            color: #ffffff;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .product-card {
            flex-direction: column;
            height: auto;
            padding: 10px;
        }

        .product-body {
            display: flex;
            width: 100%;
        }

        .product-image {
            flex: 0 0 50px;
            height: 100px;
            margin-right: 0px;
        }

        .product-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            height: 80px;
            margin-left: 65px;
        }

        .quantity-controls {
            margin-top: auto;
        }

        /* Adjust mobile view */
        @media (max-width: 480px) {
            .product-card {
                padding: 15px;
                border-width: medium;
                border-color: #5ac9c4;
            }

            .product-image {
                flex: 0 0 50px;
                height: 100px;
            }

            .product-title {
                font-size: 1.0rem;
                background: #07526d;
                border-radius: 5px;
                padding: 4px;
            }
        }
  /* NEW: Image Zoom Modal Styles */
        .image-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            z-index: 1001;
            align-items: center;
            justify-content: center;
        }

        .image-modal-content {
            max-width: 90%;
            max-height: 90%;
            position: relative;
            text-align: center;
        }

        .image-modal-content img {
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 5px;
        }

        .image-modal-close {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 40px;
            cursor: pointer;
            color: white;
            z-index: 1002;
        }

        .image-modal-caption {
            color: white;
            font-size: 1.2rem;
            margin-top: 15px;
            text-align: center;
        }
