@charset "utf-8";

/* Base Styles */

html {
    background-color: rgb(9, 51, 7);
}  

body {
  font-family: Verdana, Geneva, sans-serif;
  color: rgb(26, 25, 25);
  background-color: ivory;
  width: 95%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

header {
  text-align: center;
  padding: 20px;
  width: 80%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

h2 {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 20px;
  color: rgb(19, 18, 18);
}

nav a{
  background: linear-gradient(90deg, #4b6cb7, #182848);
  color: white;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

nav a:hover {
  background: linear-gradient(-90deg, #4b9c76, #185f24);
  color: white;
}

main {
  padding: 20px;
} 

main img {
  display: block;
  margin: 0 auto;
  width: 30%;
  padding: 25px;
  float: left;
}

img {
  width: 100%;
}


iframe {
    border: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

nav a {
  display: block;
  background-color: rgb(64, 168, 116); 
  line-height: 2.8em;
  text-decoration: none;
  text-align: center;
}


body > footer {
  background-color: rgb(64, 168, 116); 
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 0.9em;
  line-height: 2em;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  clear: both;
}

p#credit {
  background-color: black;
  color: white;
  text-transform: capitalize;
  text-align: center;
  font-style: italic;
}

.btn {
    display: block;
    padding: 10px 20px;
    background-color: #327022;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    margin: 20px;
}
.btn:hover {
    background-color: #359e7b;
}

/* Table Styles (Product page) */
table {
  border: 5px inset black;
  border-collapse: collapse;
  vertical-align: middle;
  text-align: center;
  margin-left:auto;
  margin-right:auto;
  width: 80%;
  padding: 15px;
}

table tr:nth-of-type(even) {
  background-color: rgb(64, 168, 116); 
}
thead {
  background-color: rgb(19, 18, 18);
  color: rgb(69, 172, 103);
}
th, td {
  border: 2px solid rgb(44, 105, 3);
  padding: 10px;
}

tfoot {
  text-align: center;
  background-color: rgb(19, 18, 18);
  color: rgb(37, 110, 170);
  font-style: italic;
}

button {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 15px;
}


/* Flexbox Styles (Product Gallery) */
.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  justify-content: center;
  overflow: hidden;
}

.product {
  background: #f9f9f9;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  text-align: center;
}

.scroll-container {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  max-width: 100%;
}


.scroll-container img {
  flex: 0 0 auto;
  width: 250px; 
  height: 250px;
  border-radius: 8px;
  object-fit: cover;
  scroll-snap-align: start;
  transition: transform 0.3s;
  
}


/* Mobile/Tablet Styles: 0px - 768px */
@media only screen and (max-width: 768px) {
  main img {
    width: 90%;
    float: none;
  }

  table, tbody, tr, td, th {
    display: block;

  }
  thead, tfoot {
    display: none;
  }

  tbody td {
    position: relative;
    padding-left: 40%;
    height: auto;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 10px;
    width: 40%;
  }

  td.alter::before {
    width: 0;
  }

  th.hide, td.hide {
    display: none;;
  }

  .scroll-container {
    scrollbar-width: none; 
  }
  .scroll-container::-webkit-scrollbar {
    display: none; 
  }

  td.alter .product-gallery{
    position: relative;
    right: 40%;
    width: 125%;
  }

  .scroll-container img {
    width: 100%;
  }
    form {
    width: 100%;
    font-size: large;
  }

  fieldset {
    width: 100%;
    padding: 5px;
    margin: 0;
  }

  input, select, textarea {
    position: inherit;
    display: block;
    height: 50px;
    width: 90%;
  }

  label {
    position: inherit;
    display: block;
    height: 50px;
    width: 90%;
  }

  input[type="submit"], input[type="reset"] {
    float: none;
    width: 90%;
    margin: 10px;
    font-size: 1.2em;
  }
}



/* Desktop Styles: 769px and greater */
@media only screen and (min-width: 769px) {
  html {
    background-image: url("images/bg_field_01.webp");
  }
  
  .scroll-container img:hover {
    transform: scale(1.10);
  }


  form {
    display: block;
    margin-left: auto;
    margin-right: auto;    
    width: 90%;
  }

  fieldset {
    width: 90%;
    padding: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
  }

  input, select, textarea {
    display: block;
    position: relative;
    left: 30%;
    padding: 5px;
    height: auto;
    width: 60%;
  }

  label {
    display: block;
    position: absolute;
    padding: 5px;
    width: 30%;
  }

  input[type="radio"] {
    display: inline;
    position: inherit;
    left: 0;
    width: auto;
  }

  label.radio {
    display: inline;
    position: inherit;
  }

  input[type="submit"], input[type="reset"] {
    display: block;
    float: left;
    left: 0;
    text-align: center;
    width: 40%;
    padding: 10px;
    margin-left: 5%;
    margin-right: 5%;
    margin-bottom: 10px;
  }
}




