/* General styling for the entire page */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #343a40;
}

/* New: Styling for the top announcement bar */
.announcement-bar {
    background-color: #388e3c;
    color: #fff;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* New: Sticky Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

header .logo-container img {
    height: 40px;
}

header .logo-container h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #4a4a4a;
    margin: 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

header nav ul li {
    margin-left: 25px;
}

header nav a {
    text-decoration: none;
    color: #495057;
    font-weight: 400;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 5px;
}

header nav a:hover {
    color: #212529;
    border-bottom: 2px solid #212529;
}

/* New: Styling for the homepage slider */
.slider-container {
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #fff;
}

/* Main content sections */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    background: #e9ecef;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.intro-section {
    background: #ffffff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* Button styling */
.button {
    display: inline-block;
    background: #6c757d;
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 1rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Styling for specific pages */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.products-container,
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card,
.service-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}

.product-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 1rem;
}

.product-card h3,
.service-card h3 {
    margin: 0 0 0.5rem;
}

.product-card .price,
.service-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a4a4a;
    margin: 0.5rem 0 1rem;
}

.product-card .button,
.service-card .button {
    width: 100%;
}

.features-list {
    padding-left: 1.5rem;
    list-style: square;
    color: #555;
    margin-bottom: 1rem;
}

/* Styling for other pages */
.content-section {
    background: #fff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.contact-form-section {
    background: #fff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.contact-info-section {
    background: #fff;
    padding: 2rem;
    border: 1px solid #e9ecef;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* Footer styling */
.footer-container {
    padding: 3rem 0;
    background-color: #212529;
    color: #f8f9fa;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    width: 30%;
    margin-bottom: 2rem;
}

.footer-col h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-col p, .footer-col ul {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li a {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #ced4da;
}

/* New: Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Styling for cart page */
.cart-items-container {
    background: #fff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    font-weight: bold;
}

.cart-item-price {
    color: #4a4a4a;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-controls button {
    padding: 5px 10px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
}

.remove-button {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.cart-summary-container {
    background: #fff;
    padding: 2rem;
    border: 1px solid #e9ecef;
    text-align: right;
    font-size: 1.2rem;
    border-radius: 8px;
}

.cart-summary-container h3,
.cart-summary-container p {
    text-align: right;
}

.empty-cart-message {
    text-align: center;
    color: #888;
}

/* Styling for checkout section within cart page */
#checkout-section {
    margin-top: 2rem;
}

.checkout-container {
    background: #fff;
    padding: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.checkout-form .form-group {
    margin-bottom: 1.5rem;
}

.payment-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.payment-options label {
    font-weight: normal;
}

.order-confirmation {
    padding: 2rem;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #388e3c;
    text-align: center;
    border-radius: 8px;
}

.order-confirmation h3 {
    color: #388e3c;
}

.order-confirmation p strong {
    color: #000;
}

.payment-loader {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
}

/* Styling for reviews section */
.reviews-section {
    margin-top: 3rem;
    padding: 2rem;
    background: #f9f9fa;
    border-radius: 8px;
}

.reviews-container {
    margin-top: 1.5rem;
}

.review-card {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.review-card h4 {
    margin: 0;
    font-size: 1.2rem;
}

.review-rating {
    color: #f7b731;
    margin-bottom: 0.5rem;
}

.review-form-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

/* Responsive Design for smaller screens */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 0.5rem 1rem;
    }
    
    header .logo-container {
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }
    
    header nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 15px;
    }
    
    header nav ul li {
        margin-left: 0;
    }

    main {
        padding: 1rem;
    }

    .products-container,
    .services-container {
        grid-template-columns: 1fr;
    }

    .hero-section,
    .intro-section,
    .content-section,
    .contact-form-section,
    .contact-info-section,
    .cart-items-container,
    .cart-summary-container,
    .checkout-container,
    .reviews-section,
    .review-form-container {
        padding: 1.5rem;
    }
    
    .footer-col {
        width: 100%;
        text-align: center;
    }

    .footer-row {
        flex-direction: column;
    }
}