@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=League+Spartan:wght@400;500;600;7000&display=swap");

/*================================ROOT=========================*/
:root {
  --header-height: 4rem;
  /*================================COLORS========================*/
  --first-color: hsl(176, 88%, 27%);
  --first-color-alt: hsl(129, 44%, 94%);
  --second-color: hsl(34, 94%, 87%);
  --titel-color: hsl(0, 0%, 13%);
  --text-color: hsl(154, 13%, 32%);
  --text-color-light: hsl(60, 1%, 56%);
  --body-color: hsl(0, 0%, 100%);
  --container-color: hsl(0, 0%, 93%);
  --border-color: hsl(129, 36%, 85%);
  --border-color-alt: hsl(113, 15%, 90%);
  /*================================FONTS========================*/
  --body-font: "Lato ", sans-serif;
  --second-font: "League Spartan", sans-serif;
  --big-font-size: 3.5rem;
  --h1-font-size: 2.75rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.75rem;
  --h4-font-size: 1.375rem;
  --large-font-size: 1.125rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.75rem;
  --tiny-font-size: 0.6875rem;
  --weight-400: 400;
  --weight-500: 500;
  --weight-600: 600;
  --weight-700: 700;
  --transition: cubic-bezier(0, 0, 0.05, 1);
}

/*=========================MAIN DETAILS==================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100%;
  font-family: "Arial", sans-serif;
  /* margin: 10px; */
  padding: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: var(--body-color);
  color: #333;
}

.flex {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.contanier {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

.top-section {
  padding-block: 4rem;
}

textarea,
body {
  color: var(--text-color);
  font-family: var(--body-color);
  font-size: var(--normal-font-size);
  font-weight: var(--weight-400);
}

h1,
h2,
h3,
h4 {
  font-family: var(--second-font);
  color: var(--titel-color);
  font-weight: var(--weight-600);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: black;
}

p {
  line-height: 1.5rem;
}

img {
  max-width: 100%;
}

button,
textarea {
  background-color: transparent;
  border: none;
  outline: none;
}

header::after {
  content: "";
  border-bottom: 2px solid black;
  width: 50%;
  height: 2rem;
  position: absolute;
  left: 25%;
  right: 25%;
}

.nav,
.nav-menu,
.nav-list,
.actions {
  display: flex;
  align-items: center;
}

.nav {
  height: calc(var(--header-height)+2.5rem);
  justify-content: space-between;
}

.nav-logo-img {
  width: 150px;
}

.nav-menu {
  flex-grow: 1;
  margin-left: 3rem;
}

.nav-list {
  justify-content: space-between;
  column-gap: 2.5rem;
  margin-right: auto;
}

.nav-link {
  color: var(--titel-color);
  font-size: var(--large-font-size);
  font-weight: var(--weight-700);
  transition: all 0.2s var(--transition);
}

.header-search {
  width: 100%;
  position: relative;
  margin-right: 10px;
}

@media screen and (min-width: 768px) {
  .header-search {
    width: 340px;
  }
}

.header-search .form-input {
  border: 1px solid var(--border-color-alt);
  width: 100%;
}

.form-input {
  padding-inline: 1.2rem;
  height: 45px;
  border-radius: 0.25rem;
  font-size: var(--small-font-size);
}

.search-btn {
  position: absolute;
  top: 30%;
  right: 1.25rem;
  cursor: pointer;
  font-size: var(--large-font-size);
}

.actions {
  column-gap: 1.15rem;
}

.action-btn {
  font-size: var(--large-font-size);
}

.action-btn .count {
  position: absolute;
  top: 0.8rem;
  background-color: var(--first-color);
  color: var(--body-color);
  height: 18px;
  width: 18px;
  line-height: 18px;
  border-radius: 50%;
  text-align: center;
  font-size: var(--small-font-size);
}

.active-link,
.nav-link:hover {
  color: var(--first-color);
}

.book_details-section {
  display: flex;
  flex-wrap: wrap;
  padding: 40px;
  gap: 30px;
  background-color: var(--body-color);
  margin: 20px auto;
  width: 90%;
  max-width: 1200px;
  border-radius: 8px;
}

.product-gallery {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
}

@media screen and (min-width: 768px) {
  .product-gallery {
    flex: 1 1 40%;
  }
}

.product-gallery img {
  width: 100%;
  display: block;
  margin-bottom: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
}

.product-gallery img:hover {
  transform: scale(1.02);
}

.thumbnail-gallery {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.thumbnail-gallery a,
.thumbnail-gallery img {
  display: inline-block;
  width: 22%;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.thumbnail-gallery a img {
  width: 100%;
  display: block;
  border-radius: inherit;
}

.thumbnail-gallery a:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-details {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  margin-left: auto;
}

@media screen and (min-width: 768px) {
  .product-details {
    flex: 1 1 50%;
  }
}

.product-details h2 {
  font-size: 28px;
  margin-bottom: 15px;
}

.product-details p {
  font-size: 16px;
  margin-bottom: 15px;
  color: #555;
}

.author {
  margin-bottom: 20px;
  font-style: italic;
  color: #777;
}

.price {
  font-size: 1.5em;
  margin-bottom: 15px;
}

.current-price {
  color: #e67e22;
  font-weight: bold;
}

.original-price {
  text-decoration: line-through;
  margin-left: 10px;
  color: #bbb;
}

.discount {
  margin-left: 10px;
  color: #28a745;
}

.quantity-control {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.quantity-control button {
  padding: 10px;
  background-color: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.quantity-control button:hover {
  background-color: #555;
}

.quantity-control input {
  width: 50px;
  text-align: center;
  margin: 0 10px;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.total-price {
  font-size: 1.2em;
  margin-bottom: 20px;
}
.action-buttons {
  display: flex;
  gap: 15px;
}

.action-buttons button {
  padding: 12px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.action-buttons button:hover {
  background-color: #0056b3;
}

.footer {
  background-color: var(--body-color);
  text-align: center;
  padding: 15px;
  border-top: 1px solid #eee;
  margin-top: 20px;
}

/*=======================CART==================*/


.table-container {
  margin: 15px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 1em;
  font-family: "Arial", sans-serif;
  background-color: var(--body-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
  padding: 15px;
  text-align: center;
}
.table th {
  background-color:  hsl(252, 100%, 67%);
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
}

.table td {
  border-bottom: 1px solid #ddd;
}

.table-img {
  width: 60px;
  border-radius: 4px;
}

.table-title {
  margin: 0 0 5px;
  font-size: 1.1em;
  font-weight: bold;
}

.table-description {
  color: var(--text-color);
  font-size: 0.9em;
}

.table-price,
.table-subtotal {
  font-weight: bold;
  color: #32aa95;
}

.quantity-input {
  width: 50px;
  padding: 5px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.table-trash {
  color: #e74c3c;
  cursor: pointer;
  font-size: 1.2em;
}

.table-trash:hover {
  color: #c0392b;
}

tbody tr:hover {
  background-color: #f1f1f1;
}

.cart-actions {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  margin: 20px 0;
  padding: 10px;
  background-color: var(--body-color);
  border-radius: 8px;
}

.cart-action-item {
  text-decoration: none;
  font-size: 1em;
  color: #333;
  padding: 10px 20px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  align-items: center;
}

.cart-action-item i {
  margin-right: 8px;
  font-size: 1.2em;
}

.update-cart {
  background-color: #007bff;
  color: #fff;
}

.update-cart:hover {
  background-color: #0056b3;
}

.continue-shopping {
  background-color: #28a745;
  color: #fff;
}

.continue-shopping:hover {
  background-color: #218838;
}

.clear-cart {
  background-color: #e74c3c;
  color: #fff;
}

.clear-cart:hover {
  background-color: #c0392b;
}

.Avilability {
  color: var(--first-color);
}

.table button {
  padding: 8px;
  margin: 7px;
  width: 90px;
  background-color: var(--first-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Checkout Form Styles */
.checkout-container {
  width: 95%;
  max-width: 800px;
  border: 1px solid black;
  box-shadow: var(--box-shadow);
  background: white;
  padding: 2rem;
  margin: 1rem auto;
  border-radius: 0.5rem;
  color: #0c274c;
  display: flex;
  flex-direction: column;
}

.checkout {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.checkout-container h3 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.checkout-container label {
  margin-bottom: 10px;
  display: block;
}

.checkout-container input[type="text"] {
  width: 100%;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.checkout .billing-info .info i {
  margin-right: 8px;
}

.checkout .billing-info .info .beside {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkout .billing-info .info .state,
.checkout .billing-info .info .zip,
.checkout .payment-info .info .expiryyear,
.checkout .payment-info .info .cvv {
  width: 150px;
}

.checkout .payment-info .info .besid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkout-container h4 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.checkout .payment-info .cards-icons {
  font-size: 2rem;
  margin-bottom: 20px;
  cursor: pointer;
}

.checkout .payment-info .cards-icons i:hover {
  transform: scale(0.9);
}

.cart-total-container .btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.cart-total-container .btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.cart-total-container .btn:active {
  background-color: #004080;
  transform: scale(0.98);
}
@media (max-width: 530px) {

  .table,
  .table thead,
  .table tbody,
  .table th,
  .table td,
  .table tr {
    display: block;
  }

  .table tr {
    margin-bottom: 10px;
  }

  .table td {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ddd;
  }

  .table td:before {
    content: attr(data-label);
    font-weight: bold;
  }

  .table th {
    display: none;
    /* Hide table headers */
  }
}

@media screen and (max-width: 768px) {

  .table th,
  .table td {
    padding: 10px;
    font-size: 0.9em;
  }

  .quantity-input {
    width: 40px;
    padding: 3px;
  }

  .table-trash {
    font-size: 1em;
  }

  .checkout {
    flex-direction: column;
    gap: 1rem;
  }

  .checkout .billing-info .info .state,
  .checkout .billing-info .info .zip,
  .checkout .payment-info .info .expiryyear,
  .checkout .payment-info .info .cvv {
    width: 100%;
  }

  .cart-actions {
    flex-direction: column;
    gap: 10px;
  }

  .cart-action-item {
    padding: 8px;
    font-size: 0.9em;
  }

  .cart-total-container {
    text-align: center;
  }
}

@media screen and (max-width: 359px) {

  /* Table Adjustments */
  /* .table-container {
    overflow-x: auto;
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 0.8em;
  }

  .quantity-input {
    width: 35px;
    padding: 3px;
  }

  .table-title {
    font-size: 0.9em;
  }

  .table-description {
    font-size: 0.7em;
  }

  .table-trash {
    font-size: 0.9em;
  } */

  .cart-actions {
    flex-direction: column;
    gap: 8px;
  }

  .cart-action-item {
    padding: 8px;
    font-size: 0.8em;
    width: 100%;
  }

  .checkout-container {
    padding: 1rem;
  }

  .checkout {
    flex-direction: column;
    gap: 1rem;
  }

  .checkout h3 {
    font-size: 1rem;
  }

  .checkout input[type="text"] {
    margin-bottom: 15px;
    padding: 10px;
  }

  .checkout .billing-info .info .state,
  .checkout .billing-info .info .zip,
  .checkout .payment-info .info .expiryyear,
  .checkout .payment-info .info .cvv {
    width: 100%;
  }

  .cart-total-container .btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  .table-img {
    width: 40px;
  }

  .checkout .payment-info .cards-icons {
    font-size: 1.5rem;
  }
}
#submit-order{
  width: 150px;
  padding: 15px;
  border-radius: 15px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: 0.7s ease;
  background-color: black;
  color: white;
}
#submit-order:hover{
  color: white;
  background-color: hsla(256, 72%, 46%, 1);
  transform: scale(1.1);
}
