/**************** General Styles ****************/

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif; 
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Apply specific background colors and other styling */
#services {
    background-color: #f3f3f3;
}

#about {
    background-color: #111827;
}

#products {
    background-color: #f9f9f9;
}

#cart {
    background-color: #fff3cd;
}

.hero {
    padding: 5rem 2rem 4rem;  /* Reduced top padding to bring the content up */
    margin-top: 0;
    z-index: 1;
    background-image: url('/assets/images/hero_barbershop.jpg');
    background-size: cover;
    background-position: center;
    color: rgb(255, 255, 255);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Keep content centered */
    min-height: 400px;
}

/* Ensure consistency in hero section */
.hero img {
    border-radius: 0; /* Remove rounded corners on the image itself */
}

.hero h2 {
    font-size: 3rem;
    color: #fff;
    margin: 0;  /* Remove any margin around the h2 */
    padding-bottom: 1rem;  /* Keep space below the heading */
    line-height: 1.3;  /* Add line-height to improve text spacing */
    border-bottom: none; /* Remove the border */
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;  /* Add margin below the paragraph for spacing */
}

.hero button {
    padding: 1rem 2rem;  /* Adjust padding of the button */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


section {
    padding: 3rem 1rem;
    margin: 0;
    background-color: #f9f9f9;
    border-radius: 0; /* Remove rounded corners */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    min-height: 400px;  /* Ensure all sections have a consistent minimum height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

section p {
    text-align: center;
    font-size: 1.5rem;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #f2ac08;
    padding-bottom: 0.5rem;
    max-width: 80%; /* Limits the width to 80% of the section's width */
    margin-left: auto;
    margin-right: auto; /* Centers the h2 element */
}


/* Adjust button size for smaller screens */
@media (max-width: 768px) {
    .hero #bookNowBtn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/**************** General Button Styles ****************/
button, .button-link {
    background-color: #4CAF50; /* Default Green Color */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition */
}

button:hover, .button-link:hover {
    background-color: #45a049; /* Darker green for hover state */
    transform: scale(1.03); /* Slightly scale the button on hover */
}

/* Specific buttons */
.checkout-btn {
    background-color: #007bff; /* Blue color */
    padding: 12px 24px;
    font-size: 1.1rem;
}

.checkout-btn:hover {
    background-color: #0056b3;
}

.remove-item {
    background-color: #f44336; /* Red color */
    padding: 8px 16px;
    font-size: 1rem;
}

.remove-item:hover {
    background-color: #e53935;
}

.change-service-btn {
    background-color: #007bff; /* Blue color */
    color: white;
    padding: 10px 18px;
    border: none;
    font-size: 1rem;
}

.change-service-btn:hover {
    background-color: #0056b3;
}

/* Button in the About Us Section */
.about-cta .button-link {
    background-color: #28a745; /* Yellow background */
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem; /* Adjust padding */
}

.about-cta .button-link:hover {
    background-color: #218838; /* Darker yellow when hovered */
}

/* Button in the Cart Section */
.cart-message .button-link {
    background-color: #28a745; /* Green color */
    padding: 8px 16px;
}

.cart-message .button-link:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Button in the Products Section */
.product-item .button-link {
    background-color: #007bff; /* Blue color for product buttons */
    font-size: 1rem;
    padding: 10px 20px;
}

.product-item .button-link:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/**************** Services Section ****************/
.services-table {
    box-sizing: border-box;
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    table-layout: fixed; /* Enforces uniform column width */
}

.services-container {
    max-width: 75%;
    margin: 0 auto;
    padding: 0 1rem;
}

.services-table th, .services-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.services-table th {
    background-color: #f2f2f2; /* Light background for headers */
    font-weight: bold;
}

.services-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Zebra striping for rows */
}

.services-table tr:hover {
    background-color: #f1f1f1; /* Highlight row on hover */
}

@media (max-width: 768px) {
    .services-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


/**************** Booking Form Section ****************/
.book-form {
    background: #ffffff;
    border-radius: 0; /* Remove rounded corners */
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
}

.book-form h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.book-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

.book-form input, .book-form select, .book-form button {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 0; /* Remove rounded corners */
    font-size: 1rem;
}

.book-form input[type="text"], .book-form input[type="tel"], .book-form input[type="date"], .book-form input[type="time"] {
    background-color: #f9f9f9; /* light grey */
}

.time-slots input[type="radio"] {
    margin-right: 5px;
}

.book-form button {
    background-color: rgb(128, 109, 0);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.book-form button:hover {
    background-color: darkgreen;
}

.book-form .error-message {
    color: red;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}


/**************** About us Section ****************/
.about-us {
    padding: 3rem 2rem;  /* Reduced top padding to bring the header closer */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures content is spread out vertically */
    height: auto; /* Make the section take up the full viewport height */
}

.about-us h2 {
    color: #ffffff;
    margin-top: 0;  /* Remove any default margin to bring the header up */
    margin-bottom: 1rem;  /* Give some space below the header */
}

/* Limit the paragraph width to 60% of the screen width */
.about-text {
    max-width: 60%;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1rem;  /* Adjust font size */
    line-height: 1.6; /* Line height for better spacing */
    color: #faf5f5;
    margin-bottom: 2rem;  /* Add more space between paragraphs */
}

.about-cta {
    
    text-align: center;  /* Center-align the button */
}

.about-cta .button-link {
    display: inline-block;
    padding: 0.8rem 1.5rem; /* Adjusted padding for a slightly larger button */
    color: white; /* Text color to white */
    border-radius: 8px; /* Rounded corners */
    text-decoration: none; /* Remove underline from link */
    font-weight: bold; /* Make text bold */
    text-transform: uppercase; /* Make text uppercase */
    font-size: 1.2rem; /* Slightly increased font size */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition for background color and hover effect */
}

.about-cta .button-link:hover {

    transform: scale(1.02); /* Slightly scale up the button on hover */
}

/**************** Products of Sales Section ****************/
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.product-item {
    border: 1px solid #ccc;
    padding: 1rem;
    border-radius: 0; /* Remove rounded corners */
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    background-color: #fff;
}

.product-item p {
    font-size: 1rem; /* Smaller font size */
    line-height: 1.4;  /* Adjust line height for better spacing */
    color: #555; /* Slightly darker color for better readability */
}


.product-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 0; /* Remove rounded corners */
}


/**************** Cart Page Styles ****************/
#cart {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem 2rem; /* Extra top padding */
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Cart header */
#cart h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Table styling */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    background-color: #fff;
}

.cart-table th,
.cart-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.cart-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #444;
}

.cart-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.cart-table tr:hover {
    background-color: #f1f1f1;
}

/* Cart total section */
.cart-total {
    text-align: right;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    color: #333;
}

.cart-total p {
    font-weight: bold;
}

/* Checkout button */
.checkout-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0; /* Sharp corners */
    font-size: 1.1rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #45a049;
}

/* Remove item button */
.remove-item {
    padding: 5px 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 0; /* Sharp corners */
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.remove-item:hover {
    background-color: #e53935;
}

/* Change service button */
.change-service-btn {
    background-color: #007bff;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 0; /* Sharp corners */
    margin-top: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.change-service-btn:hover {
    background-color: #0056b3;
}



/**************** Page Messages Section ****************/
.page-messages {
    margin-bottom: 2rem;
}

.suggestion-box,
.booking-banner {
    background: #f3f3f3;
    padding: 1rem;
    border-left: 5px solid #007bff;
    margin-bottom: 1rem;
    border-radius: 0; /* Remove rounded corners */
}


/**************** Cart Messages Section ****************/
.cart-message {
    background-color: #e0ffe0;
    color: #2d662d;
    border: 1px solid #b2d8b2;
    padding: 12px 20px;
    border-radius: 0; /* Remove rounded corners */
    font-weight: 500;
    max-width: 500px;
    margin: 20px auto;  /* Center horizontally */
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 128, 0, 0.1);
    position: relative;
}

.cart-summary {
    background-color: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 14px;
    border-radius: 0; /* Remove rounded corners */
    margin: 20px auto;
    font-size: 14px;
    max-width: 300px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}


/**************** Flash Messages Section ****************/
.alert {
    padding: 15px;
    margin: 20px auto;
    width: 90%;
    max-width: 600px;
    border-radius: 0; /* Remove rounded corners */
    font-size: 16px;
    text-align: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}


/**************** Card Styles ****************/
.card {
    border: 1px solid #ddd;
    border-radius: 0; /* Remove rounded corners */
    padding: 1rem;
    margin: 1rem;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
    text-align: center;
}

.card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/**************** Button Link Styles ****************/
.button-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #4ade80;
    color: white;
    border-radius: 0; /* Remove rounded corners */
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.button-link:hover {
    background-color: #22c55e;
}

/*================= Universal Table Style =================*/
/* Universal Table Style */
.table {
    width: 90%;  /* Table width is now 80% of the screen */
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background-color: #fff;
    border-radius: 0; /* Remove rounded corners */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Container for horizontal scroll (if table exceeds width) */
.table-horizontal-scroll {
    width: 100%;
    overflow-x: auto;
}

/* Table Header */
.table thead {
    background-color: #111827;
    color: #ffffff;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #f1f1f1;
}

.table th {
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

/* Styled Table */
.styled-table {
    width: 80%;  /* Table width is now 80% of the screen */
    border-collapse: collapse;
    background-color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px auto;
    min-width: 1300px;  /* Prevent shrinking below 1000px */
    max-width: 1400px;  /* Max width to prevent table from becoming too large */
}

.styled-table th,
.styled-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.styled-table thead {
    background-color: #ebf5fe;
    color: rgb(54, 45, 45);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0.5px;
}



/* Scrollable Table Body for 5 Rows */
.table-scroll-wrapper {
    max-height: 510px; /* Adjust height to show approximately 5 rows */
    overflow-y: auto;
    margin: 0 auto;
}

/* Optional: Add a custom scrollbar */
.table-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}



.booking-actions button {
    margin: 5px;
}

.booking-actions form {
    display: inline-block;
}

#edit-form-row {
    background-color: #f9f9f9;
    padding: 10px;
}

