:root {
    --dark-primary-color: #6f42c1;
    --default-primary-color: #007bff;
    --light-primary-color: #D7CCC8;
    --text-color: #FFFFFF;
    --accent-color: chartreuse;
    --primary-text-color: #212121;
    --secondary-text-color: cornflowerblue;
    --divider-color: #ffffff;
}


*, *:before, *:after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h2 {
  font-size: 25px;
  font-weight: bold;
}

body {
  background-color: var(--divider-color);
  height: 100vh;
  font-family: Arial, sans-serif;
  font-size: 10px;
}

body > * {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

body > header {
  background-color: var(--dark-primary-color);
  color: var(--text-color);
  padding: .5rem 1rem;
  text-align: center;
}

body > main {
  background-color: var(--divider-color);
  flex: 1 0 auto;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 15px;
}

body > footer {
  background-color: var(--dark-primary-color);
  color: var(--text-color);
  padding: .5rem 1rem;
  text-align: center;
  position: fixed;
  bottom: 0;
}

article {
  background-color: var(--text-color);
  box-shadow: 2px 6px 25px rgba(0, 0, 0, 0.1);
}

article > header {

}

article > main {

}

article > footer {
  padding: 10px;
  margin: 0 30px;
  text-align: center;
  border-top: 1px solid #efefef;
}

#btnInstall, #btnInvoice, #btnLogout, #btnPrint, #btnBack {
  background-color: var(--dark-primary-color);
  color: #fff;
  display: inline-block;
  visibility: hidden;
  text-decoration: none;
  font-weight: 600;
  padding: .5rem 1rem;
  margin: 0 auto;
  display: inline-block;
  border-radius: 2px;
  width: 100%;
}

.combo-list {
  height: 60px;
}

.newline {
  width: 100%;
  min-width: 100%;
  height: 10px;
}


article h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

article span {
  margin: 0 0 15px;
  font-size: 1rem;
  font-weight: 700;
}

article p {
  padding: 20px 0;
  line-height: 1.6;
  text-align: justify;
}

article > main {
  padding: 30px 30px;
}

a {
    text-decoration: none;
    color: inherit;
    min-width: 100%;
}

img {
  display: block;
  width: 100%;
  height: 200px;
  margin: auto;
}

hr {
  width: 75%;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

footer a:active,
a:focus,
a:hover {
  color: var(--secondary-text-color);
}

.invoice {
  width: 100%;
}

table {
  padding: 1px;
  margin:  5px 1px;
  width: 100%;
}

tr {
  width: 100%;
}

#btnInvoice, #btnLogout, #btnPrint, #btnBack {
  height: 50px;
  font-size: 15px;
  margin: 10px 15px;
  width: 92%;
  visibility: visible;
  background-color: #002d5b;
  vertical-align: middle;

}

#btnInvoice {
  background: url('https://vienesaapp.effica.io/images/icons/credit_sale.png');
  background-size: 75px;
  background-color: var(--default-primary-color);
  background-position: right center;
  background-repeat: no-repeat;
  min-width: 150px;
  text-align: left;
}

#btnLogout {
  background: url('https://vienesaapp.effica.io/images/icons/exit.png');
  background-size: 75px;
  background-color: var(--default-primary-color);
  background-position: right center;
  background-repeat: no-repeat;
  min-width: 150px;
  text-align: left;
}

#btnPrint {
  background-color: #00aa00; 
}
form {
  width: 95%;
}

input {
  margin: 4px;
  padding: 5px;
  width: 100%;
}

.login {
  font-size: 18px;
  font-weight: bold;
}

.link {
  font-size: 15px;
  color: #fff;
}

#submit {
  margin: 10px 0;
  padding: 10px;
  font-size: 15px;
  width: 100%;
  background-color: #00aa00;
  color:  #fff;
  font-weight: bold;
}

#nit, #amount, #name, #gas, #pump, #payment_method {
  font-size: 25px;
  width: 90%;
}

#gas, #pump, #payment_method {
  margin: 10px;
  padding: 10px;
}

.control-label {
  display: block;
  width: 100%;
}

.main_header {
  padding-top: 120px;
  background: url('https://vienesaapp.effica.io/images/icons/icon-512x512.png');
  background-size: 100px;
  background-color: var(--dark-primary-color);
  background-repeat: no-repeat;
  background-position: center 10px;
}

p {
  margin-bottom: 0;
}

.spinner-border {
  display: none;
}

#spinner-element {
  display: none;
  width: 350px; 
  height: 350px;
  margin: 0 auto;
}

.form {
  margin: 0 auto;
}

/* Ficha de producto: presentación amplia para escritorio y adaptable a móvil. */
.product-detail-page {
  align-items: flex-start;
  padding: 28px 24px 48px;
}

.product-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 42px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(33, 33, 33, .10);
}

.product-detail-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--dark-primary-color);
}

.product-detail-title h1 {
  margin: 0;
  color: #18324d;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.15;
}

.product-detail-title strong {
  color: var(--dark-primary-color);
  font-size: 1.35rem;
  white-space: nowrap;
}

.product-detail-description {
  margin: 22px 0;
  color: #59636e;
  font-size: 1rem;
  line-height: 1.5;
}

.product-detail-form form {
  width: 100%;
}

.product-detail-form input,
.product-detail-form textarea,
.product-detail-form select {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 1rem;
}

.product-detail-form #submit {
  margin: 18px 0 0;
  border: 0;
  border-radius: 7px;
  background: var(--default-primary-color);
  font-size: 1rem;
  cursor: pointer;
}

.product-detail-back {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  color: #374151;
  text-align: center;
  font-weight: 600;
}

.product-detail-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  margin: 0;
  padding: 20px;
  border-radius: 12px;
  background: #f8fafc;
}

.product-detail-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

table {
  table-layout: fixed;
  width: 100%;
}

th,
td {
  padding: 10px;
  text-align: left;
}

thead th {
  position: sticky;
  top: 0;
  background-color: gray;
  color: white;
}

tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

.booking_number, .booking_date {
  text-align: right;
  width: 100px;

}

.inner_line {
  border-bottom: 1px solid #f3f3f3;
}
.last_line {
  font-weight: bold;
  text-align: right;
}
.identifier {
  font-weight: bold;
}

.sale-lines {
  width: 100%;
  margin: 16px 0;
  border-collapse: separate;
  border-spacing: 0 8px;
  table-layout: fixed;
}

.sale-lines th {
  padding: 12px 8px;
  border: 0;
  background: #7442c8;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.sale-lines th:first-child {
  width: 45%;
  border-radius: 8px 0 0 8px;
  text-align: left;
}

.sale-lines th:last-child {
  border-radius: 0 8px 8px 0;
}

.sale-line td {
  padding: 12px 8px;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
  background: #fff;
  text-align: center;
  vertical-align: middle;
}

.sale-line td:first-child {
  border-left: 1px solid #e3e3e3;
  border-radius: 8px 0 0 8px;
}

.sale-line td:last-child {
  border-right: 1px solid #e3e3e3;
  border-radius: 0 8px 8px 0;
}

.sale-product {
  overflow-wrap: anywhere;
  color: #253044;
  font-weight: 600;
  text-align: left !important;
}

.sale-product-name {
  line-height: 1.25;
}

.sale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sale-price {
  color: #253044;
  white-space: nowrap;
}

.sale-quantity {
  color: #253044;
  font-size: 18px;
  font-weight: 700;
}

.sale-subtotal {
  color: #253044;
  font-weight: 700;
  white-space: nowrap;
}

.sale-button {
  display: inline-flex;
  min-width: 30px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.sale-button-plus {
  background: #20a464;
  color: #fff;
}

.sale-button-minus {
  background: #e7a51c;
  color: #fff;
}

.sale-button-delete {
  min-width: 72px;
  min-height: 30px;
  background: #e52d61;
  color: #fff;
  font-size: 11px;
}

@media (max-width: 700px) {
  .sale-lines th,
  .sale-line td {
    padding: 9px 4px;
  }

  .sale-lines th:first-child {
    width: 38%;
  }

  .sale-button-delete {
    min-width: 64px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .sale-lines {
    margin: 10px 0;
    font-size: 12px;
  }

  .sale-lines th,
  .sale-line td {
    padding: 7px 2px;
  }

  .sale-lines th:first-child {
    width: 34%;
  }

  .sale-product {
    font-size: 12px;
  }

  .sale-actions {
    gap: 4px;
    margin-top: 6px;
  }

  .sale-price {
    font-size: 11px;
  }

  .sale-quantity {
    font-size: 14px;
  }

  .sale-button {
    min-width: 26px;
    min-height: 26px;
    border-radius: 4px;
    font-size: 16px;
  }

  .sale-button-delete {
    min-width: 58px;
    min-height: 26px;
    font-size: 9px;
  }
}

/* RESPONSIVE AREA  */

@media screen and (min-width: 800px) {
  main {
    max-width: 800px;
    margin: 20px auto;
    border-radius: 10px;
  }
  img {
    max-width: 100%;
    height: 200px;
  }

}

/* Cuadrículas del menú y de productos */
.category-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(150px, 1fr));
  grid-auto-rows: minmax(150px, 1fr);
  gap: 12px;
  padding: 12px;
}

.product-grid {
  grid-template-rows: repeat(3, minmax(170px, 1fr));
  grid-auto-rows: minmax(170px, 1fr);
}

.category-card,
.product-card {
  min-height: 150px;
  border: 1px solid #d8d8d8;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.product-card {
  min-height: 170px;
}

.category-card a,
.product-card a {
  display: flex;
  height: 100%;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  color: #087df5;
  text-decoration: none;
}

.product-card a {
  min-height: 170px;
}

.category-card img,
.category-image-placeholder,
.product-card img,
.product-image-placeholder {
  display: block;
  width: 100%;
  height: 105px;
  object-fit: cover;
  background: #f0f0f0;
}

.product-card img,
.product-image-placeholder {
  height: 120px;
}

.category-image-placeholder,
.product-image-placeholder {
  background: linear-gradient(135deg, #eeeeee, #d8d8d8);
}

.category-name,
.product-name {
  padding: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.product-name {
  font-size: 15px;
}

@media (max-width: 700px) {
  .product-detail-page {
    padding: 12px;
  }

  .product-detail-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px;
  }

  .product-detail-image-wrap {
    order: -1;
    min-height: 240px;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
