/* Reset & base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    overflow-y: scroll;
    position: relative;
}

/* Background Image */
#bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../photos and videos/5166950.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    background-color: #1d1c1e8f;
    padding: 1.9rem 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}
.navbar .container {
     display: flex;
  flex-direction: row;            /* instead of column */
  justify-content: space-between; /* pushes brand to left, nav to right */
  align-items: center;   
}

.navbar-brand {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.navbar-nav {
       display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-left: auto; /* extra insurance that it stays on the right */
  width: auto;     
}
.nav-item a,
.nav-cart-icon {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}


.nav-item a:hover,
.nav-cart-icon:hover {
    color: #00bcd4;
}

/* Shop Section */
#shop {
    padding: 2rem;
    color: white;
}

.product-list {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.product {
    background-color: #ffffff00;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    width: 200px;
    color: white;
}
.product img {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.product button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

/* Cart Sidebar */
#cart {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background-color: #fff;
  padding: 20px;
  color: black;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
  z-index: 1000;

  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


#cart.cart-open {
    right: 0;
}

/* Cart Content */
#cart h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

#cart ul {
    list-style-type: none;
}

#cart ul li {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
}

#cart-total {
    font-weight: bold;
}

/* Cart Toggle Button */
.cart-toggle-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: #00bcd4;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000;
}

.cart-toggle-btn:hover {
    background-color: #0097a7;
}

/* Cart Icon & Count */
.cart-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
}

.cart-icon img {
    width: 40px;
    height: 40px;
}

.cart-item-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    font-size: 12px;
    border-radius: 50%;
    padding: 5px 10px;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

.product-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    margin-top: 0;
    padding: 0 10px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Open state */
.product-details.open {
    max-height: 500px;
    opacity: 1;
    margin-top: 10px;
    padding: 10px;
}

/* View Details Button */
.view-details {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-details:hover {
    background-color: #0056b3;
}

/* Media Queries */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .nav-item a,
    .nav-cart-icon {
        padding: 1rem 1.5rem;
        font-size: 1.2rem;
        background-color: transparent;
    }
    .navbar-brand {
        font-size: 1.25rem;
    }

    .product-list {
        flex-direction: column;
        align-items: center;
    }

    .product {
        width: 80%;
        margin-bottom: 1rem;
    }

    #cart {
        width: 80%;
        top: 50px;
    }

    .cart-toggle-btn {
        right: 10px;
        bottom: 10px;
    }
}


/* Cart Sidebar Improvements */
#cart {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background-color: #fff;
  padding: 20px;
  color: black;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
  z-index: 1000;

  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


#cart h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #222;
}

#cart-items {
  flex-grow: 1;
  padding: 0;
  margin: 0;
}

#cart-items li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}


.cart-item-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

#cart-items span {
  display: inline-block;
  min-width: 70px;
}

.qty-btn {
  background-color: #00bcd4;
  color: white;
  border: none;
  padding: 5px 10px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 2px;
}


.qty-btn:hover {
  background-color: #0097a7;
}

#cart-total {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 1rem;
}

#checkout-btn {
  background-color: #10c7ec;
  color: white;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#checkout-btn:hover {
  background-color: #0ba2bd;
}

.close-cart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

.close-cart-btn:hover {
  color: #00bcd4;
}

.nav-cart-icon {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
}

.cart-item-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: red;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
  font-weight: bold;
}


@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }
    .nav-item a,
    .nav-cart-icon {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        background-color: transparent;
    }
    h1 {
        font-size: 2rem;
    }
    p {
        font-size: 0.95rem;
    }
}

@media (max-width: 1200px) {
  .navbar {
    padding: 1rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .nav-item a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
  }

  h1 {
    font-size: 2rem;
  }

  p {
    font-size: 0.95rem;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 1rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .nav-item a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
  }

  h1 {
    font-size: 2rem;
  }

  p {
    font-size: 0.95rem;
  }
}

