/* Color Variables */
:root {
  --waikawa-gray: #4a548a;         /* Darkened for contrast - good for backgrounds or headings */
  --valencia: #c0392b;             /* Slightly deeper red - excellent for buttons, alerts */
  --de-york: #6fbf87;              /* Slightly darker green - great for success states or accents */
  --wafer: #f4e9ea;                /* Light neutral - good background */
  --crail: #a8422e;                /* Rich reddish-brown - great for accents or call-to-action */
  --antique-brass: #b98c63;        /* Muted warm tone - great secondary accent or background */
  --ronchi: #e6a82f;               /* Bolder yellow - works for highlights with caution */
  --twine: #a0703b;                /* Better contrast for text on light backgrounds */
  --woodland: #3e4421;             /* Darkened green - perfect for navbars, footers, base background */
  --conch: #c7dcd1;                /* Cool contrast - gentle background or secondary UI color */
}

  /* General Body Styles */
  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--wafer);
    color: var(--waikawa-gray);
  }

  /* Header */
  header {
    background-color: var(--ronchi);
    color: var(--wafer);
    text-align: center;
    padding: 20px;
  }

  /* Navbar */
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--woodland);
    white-space: nowrap; /* Prevents text from wrapping */
    overflow-x: auto; /* Enables horizontal scrolling */
    scrollbar-width: none; /* Hides scrollbar in Firefox */
    -ms-overflow-style: none; /* Hides scrollbar in IE/Edge */
  }
  .nav-bar a {
    flex-shrink: 0; /* Prevents items from shrinking */
  }
  #nav-logo {
    max-width: 100px;
    background: transparent;
    height: auto; /* Maintains aspect ratio */
  }

  .navLinks {
    list-style: none;
    display: flex;
    gap: 1rem;
    text-align: center;
  }

  .navLinks a {
    color: var(--wafer);
    text-decoration: none;
    font-weight: 500;
  }
  .navLinks.open {
    display: flex;
  }
  .navLinks li {
    margin: 0.5rem 0;
    text-align: right;
  }
  .navLinks a {
    color: var(--wafer);
    text-decoration: none;
    font-weight: 500;
  }
  .navLinks a:visited {
    color: var(--wafer);
  }

  .navLinks a:hover {
    color: var(--de-york); /* Hover color */
  }
  .hamburger {
    display: block;
    font-size: 1.5rem;
    color: var(--wafer);
    cursor: pointer;
  }
  @media (min-width: 768px) {
    .hamburger {
      display: none;
    }

    .navLinks {
      display: flex !important;
      position: static;
      flex-direction: row;
      gap: 1rem;
      background: none;
      box-shadow: none;
      padding: 0;
    }

    .navLinks li {
      margin: 0;
      text-align: center;
    }
  }
  @media (max-width: 768px) {
    #nav-logo {
      width: 80px; /* Reduce size on mobile */
      filter: invert(1);
  }
    .navbar {
        padding: 0.5rem; /* Reduce padding to save space */
    }

    .navbar-links {
        gap: 0.5rem; /* Reduce spacing between links */
    }

    .navbar a {
        font-size: 0.875rem; /* Makes text smaller */
    }
    .navLinks {
      position: absolute;
      top: 60px; /* adjust based on navbar height */
      left: 0;
      right: 0;
      background-color: var(--woodland);
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      padding: 1rem 0;
      display: none;
      z-index: 999;
    }

    .navLinks.open {
      display: flex;
      animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
}
  /* Main Content */
  #body {
    background-color: var(--twine);
  }
  main {
    padding: 20px;
    text-align: center;
  }

  section {
    margin-bottom: 40px;
  }

  section h2 {
    color: var(--woodland);
    font-size: 2em;
  }

  section p {
    color: var(--woodland);
    font-size: 1.2em;
    line-height: 1.6;
  }
  section p{
    color: var(--wafer);
  }
  section h2{
    color: var(--wafer);
  }

  #home {
    text-align: center;
    margin: 20px 0;
  }

  #homeImg {
    max-width: 70%;
    height: auto;
    max-height: 60vh;
    border-radius: 10px;
  }
  @media (max-width: 768px) {
    #homeImg {
      max-width: 90%; /* Increases size on smaller screens */
    }
  }

  @media (max-width: 480px) {
    #homeImg {
      max-width: 100%; /* Ensures it takes up almost the full width */
    }
  }
  .home-page {
    position:relative;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('./backgroundImg.jpg');
  }

  .home-page-section {
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin: 0 auto;
    margin-bottom: 40px;
    /* border: 2px solid var(--conch); */
  }
  @media (min-width: 1024px) {
    .home-page-section {
      max-width: 60%;
    }
  }
  /*Buy a copy page*/
  .buy-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    height: auto;
    text-align: center; /* Ensures text alignment is consistent */
  }
  /*
  Image Carousel
  */
  .image-carousel {
    display: flex;
    position: relative;
    height: 75vh;
    align-items: center;
    gap: 16px;
    padding: 0 40px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .thumbnail-column {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly; /* evenly distribute thumbnails */
    align-items: center; /* center thumbnails horizontally */
    height: 100%;
    padding: 10px;
  }

  .carousel-thumbnails {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    height: 100%;
  }

  .carousel-thumbnails img {
    width: 90px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.2s, border 0.2s;
  }

  /* Optional: Larger thumbnails on big screens */
  @media (min-width: 1024px) {
    .carousel-thumbnails img {
      width: 100px;
      height: 120px;
    }
  }
  @media (max-width: 768px) {
    .image-carousel {
      flex-direction: column; /* Stack the items vertically */
      height: auto; /* Dynamic height */
    }

    /* Ensure Thumbnails are below the image carousel */
    .thumbnail-column {
      flex-direction: row; /* Thumbnails in a horizontal row */
      justify-content: center; /* Center the thumbnails */
      padding: 0; /* Remove extra padding */
      width: 100%;
      order: 1; /* Ensure thumbnails are at the bottom (after image) */
    }

    /* Adjust thumbnail layout */
    .carousel-thumbnails {
      flex-direction: row; /* Display thumbnails horizontally */
      justify-content: center;
      width: 100%;
    }

    .carousel-thumbnails img {
      width: 60px;
      height: 60px;
      margin: 0 8px; /* Add space between thumbnails */
    }

    /* Make the image fit to container width on mobile */
    .carousel-photo {
      width: 100%; /* Take full width of the container */
      height: auto; /* Adjust height accordingly */
    }
    .carousel-arrow {
      display: none;
    }
  }

  .carousel-thumbnails img.highlighted {
    border: 2px solid #007bff;
    transform: scale(1.05);
  }

  .carousel-main-image {
    flex-grow: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  .currentSlide {
    height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
  }
  .carousel-photo {
    height: 100%;
    width: 100%;
    object-fit: contain; /* Make sure the whole image fits inside */
  }


  .carousel-arrow {
    top: 50%;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 2;
    user-select: none;
  }

  .left-arrow {
    left: 10px;
  }

  .right-arrow {
    right: 10px;
  }




  /*
  Product Info
  */

  .product-info-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding-left: 10%;
  }

  @media (min-width: 768px) {
    .buy-container {
      flex-direction: row;
      align-items: flex-start;
    }
  }


  .details-container {
    flex: 1;
    text-align: center;
    align-items: center;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    margin: auto; /* Centers it horizontally */
  }

  .details-container button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: var(--waikawa-gray);
    color: var(--wafer);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
  }
  .description1 {
    font-size: 1.5rem;
    font-weight: bold;
  }

  .details-container button:hover {
    background-color: var(--de-york);
  }

  /* Mobile adjustments */
  @media (max-width: 768px) {
    .buy-container {
      flex-direction: column; /* Stack elements vertically */
      padding: 1rem;
      justify-content: center;
    }


    .details-container {
      font-size: 1rem; /* Scale down text size */
      margin: auto; /* Ensure it's centered */
    }
  }

  .title {
    font-size: 2rem;
    font-weight: bold;
  }

  .description {
    font-size: 1rem;
    color: var(--waikawa-gray);
  }

  .quantity-container {
    display: flex;
    flex-direction: column;
  }

  .quantity-label {
    font-size: 1rem;
    margin-bottom: 5px;
  }

  .quantity-select {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid var(--wafer);
    border-radius: 5px;
  }

  .price-container {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
  }
  .original-price {
    text-decoration: line-through;
    color: var(--waikawa-gray);
    margin-right: 8px;
  }
  .discount-price {
    color: var(--valencia);
  }

  .price-value {
    font-weight: bold;
    color: var(--waikawa-gray);
  }

  /* Buttons */
  button {
    background-color: var(--valencia);
    border: none;
    padding: 10px 20px;
    color: var(--wafer);
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
  }

  button:hover {
    background-color: var(--crail);
  }
  .checkout-button {
    background-color: var(--waikawa-gray);
    color: var(--wafer);
    font-size: 1rem;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
  }

  .checkout-button:hover {
    background-color: var(--waikawa-gray);
  }

  /* Checkout page */
  .checkout-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
  }

  .title {
    font-size: 2em;
    margin-bottom: 20px;
  }

  /* Make the form a flex container with vertical direction */
  .address-form {
    display: flex;
    flex-direction: column; /* Stacks elements vertically */
    gap: 15px; /* Adds spacing between the elements */
  }

  .address-form label {
    font-size: 1.1em;
    margin-bottom: 5px;
  }

  .address-form input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid var(--conch);
  }

  .confirm-button {
    background-color: var(--de-york);
    color: var(--woodland);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    font-size: 16px;
  }

  .confirm-button:disabled {
    background-color: var(--conch);
  }

  .error {
    color: var(--valencia);
    font-size: 1.2em;
    margin-top: 20px;
  }

  .shipping-details {
    margin-top: 20px;
  }
  /*Comic Reader */


  .comic-reader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* Ensures full-page centering */
    text-align: center;
  }

  .comic-reader-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
  }

  .comic-reader-image {
    height: 70vh; /* 70% of the viewport height */
    max-width: 90vw; /* Ensures it doesn’t overflow */
    object-fit: contain; /* Maintains aspect ratio */
  }

  .comic-reader-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    gap: 10px; /* Space between buttons */
  }

  .comic-reader-navigation button {
    cursor: pointer;
    padding: 5px;
  }

  /* Reader Authentication */
  .reader-auth {
    text-align: center;
  }

  .auth-description {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--waikawa-gray);
    font-weight: 500;
  }
  /* Footer */
  footer {
    padding: 20px;
    text-align: center;
    background-color: var(--woodland);
    color: var(--wafer);
    border-top: 1px solid var(--antique-brass);
    margin-top: 20px;
  }
  #instagram {
    color: var(--conch);
  }

  /* Card Components */
  .card {
    background-color: var(--wafer);
    border: 1px solid var(--antique-brass);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
  }

  .card:hover {
    transform: scale(1.05);
  }

  .card h3 {
    color: var(--ronchi);
  }

  .card p {
    color: var(--woodland);
  }
