body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

h1, h2, h4 {
    color: #333;
}
h1 { text-align: center; }


.controls {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.controls label {
    margin-right: 10px;
}

.controls input[type="text"] {
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-grow: 1;
    min-width: 200px;
}

.controls button {
    padding: 8px 15px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px; /* For wrapping */
}
.controls button:hover {
    background-color: #4cae4c;
}
.controls button#groupProductsBtn {
    background-color: #007bff;
    margin-left: 10px;
}
.controls button#groupProductsBtn:hover {
    background-color: #0056b3;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #e9e9e9;
    font-weight: bold;
}

/* Styling for selected rows via checkbox */
.order-row.selected-by-checkbox {
    background-color: #e6f7ff;
}

/* Expansion click target and cursor */
.order-row td:not(:first-child) {
    cursor: pointer;
}
.order-row td:first-child { /* Checkbox cell */
    cursor: default;
}
.order-row:hover td:not(:first-child) { /* Hover effect only on expandable cells */
     background-color: #f0f8ff;
}


.order-row.expanded td:not(:first-child) { /* Style for expanded row, excluding checkbox cell */
    background-color: #cce5ff;
}
.order-row.expanded:hover td:not(:first-child) {
    background-color: #b8daff;
}

/* Add to your style.css - Optional visual feedback */
.order-row.copy-active {
    background-color: #d4edda !important; /* A light green to indicate success/action */
    transition: background-color 0.3s ease-out;
}
.order-lines-container td {
    padding: 0;
    border: none;
}

.order-lines-content {
    padding: 15px;
    background-color: #fdfdfd;
    border-top: 2px solid #007bff;
}

.order-lines-content h4 {
    margin-top: 0;
    color: #007bff;
}

.order-lines-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

// Continuing style.css

.order-lines-table th, .order-lines-table td {
    border: 1px solid #eee;
    padding: 8px;
    text-align: left;
}

.order-lines-table th {
    background-color: #f0f8ff;
}


/* Grouped Products Table Styles */
#groupedResultsContainer {
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

#groupedProductsTable {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

#groupedProductsTable th,
#groupedProductsTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#groupedProductsTable th {
    background-color: #f0f0f0;
    font-weight: bold;
}

#noGroupedResultsMessage {
    padding: 10px;
    text-align: center;
    color: #555;
}

#printGroupedProductsBtn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    /* background-color: #17a2b8; /* Info blue/teal */
    /* color: white; */
    margin-right: 10px; /* Optional: if you have other buttons next to it */
}

#printGroupedProductsBtn:hover {
    background-color: #138496;
}
/* Responsive adjustments for all tables */
@media screen and (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    /* Hide original table headers */
    table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px; /* Space between stacked rows */
    }

    table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%; /* Space for the label */
        white-space: normal;
        text-align:left;
        min-height: 30px; /* Ensure cells have some height */
        display: flex; /* For better alignment of label and content */
        align-items: center;
    }

    table td:before {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 6px;
        width: 45%; /* Less than 50% to prevent overlap */
        padding-right: 10px;
        white-space: nowrap;
        text-align:left;
        font-weight: bold;
        content: attr(data-label); /* Use data-label for content */
    }

    /* Specific for checkbox column in ordersTable */
    #ordersTable td:first-child {
        padding-left: 10px; /* Just space for checkbox */
        min-height: auto; /* Reset min-height for checkbox cell */
    }
    #ordersTable td:first-child:before {
        display: none; /* Hide label for checkbox column */
    }

    /* Specific for order lines container - it's a single full-width cell */
    .order-lines-container td {
        padding-left: 0; /* Reset padding */
    }
    .order-lines-container td:before {
        display: none; /* No label for this container cell */
    }
    /* Ensure sub-tables within expanded rows also get responsive treatment if needed */
    .order-lines-table td {
        /* It will inherit the general td responsive rules, which is good */
    }
}
/* style.css */

/* Style for the container of the order lines, giving it padding and a background */
.order-lines-content {
    padding: 15px;
    background-color: #f9f9f9; /* A light grey background to differentiate */
    border-top: 2px solid #ddd; /* A top border to separate from the main row */
}

/* Main style for the order lines table itself */
.order-lines-table {
    width: 100%;
    border-collapse: collapse; /* This makes the borders look clean */
    margin-top: 10px;
}

/* Style for all cells (header and body) in the order lines table */
.order-lines-table th,
.order-lines-table td {
    border: 1px solid #ccc; /* This is the main border for each cell */
    padding: 8px;
    text-align: left;
}

/* Style specifically for the header of the order lines table */
.order-lines-table th {
    background-color: #e9ecef; /* A slightly darker grey for the header */
    font-weight: bold;
}


/* In style.css */

/* Style for the button to complete an order */
.complete-order-btn {
    background-color: #28a745; /* Green */
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.complete-order-btn:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Style for a disabled or loading state */
.complete-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}



body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

header {
    background-color: #0b131f; /* Fundo mais escuro para máximo contraste */
    color: #ffffff;
    padding: 15px 0;
    border-bottom: 3px solid #00b4d8; /* Linha de destaque elegante */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #ffffff; /* Branco puro para total nitidez */
    font-weight: bold;
    letter-spacing: 0.5px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav a {
    color: #e0e6ed; /* Cinzento muito claro para boa leitura nos links */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

nav a.active, nav a:hover {
    color: #00b4d8; /* Azul vivo ao passar o rato ou na página ativa */
}

.hero {
    /* Filtro preto mais opaco (0.75) para garantir contraste total sobre a imagem */
    background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.75)), url('https://images.unsplash.com/photo-1551024709-8f23befc6f87?auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover;
    color: #ffffff;
    text-align: center;
    padding: 90px 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6); /* Sombra suave no texto para destacar ainda mais */
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 25px auto;
    color: #f1f5f9; /* Branco suave de alta legibilidade */
}

.btn {
    display: inline-block;
    background-color: #00b4d8;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

.btn:hover {
    background-color: #0096c7;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #00b4d8; /* Detalhe visual nas caixas de produtos */
}

.product-card h3 {
    margin-top: 0;
    color: #0b131f;
}

.contact-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

footer {
    background-color: #0b131f;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.95rem;
}

/* Estilos para a página da Aplicação */
.app-section {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    justify-content: center;
}

.app-logo {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    object-fit: cover;
}

.app-content {
    flex: 1;
    min-width: 280px;
}

.app-content h2 {
    color: #0b131f;
    margin-top: 0;
    font-size: 2rem;
}

.btn-download {
    display: inline-block;
    background-color: #2b9348; /* Verde forte para chamar a atenção para o download */
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.2s;
}

.btn-download:hover {
    background-color: #1b7331;
}

.app-note {
    margin-top: 15px;
    color: #666;
}