/*=============OVERALL==========================*/
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}


/*=======================NAVBAR========================*/
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1000; /* ensures navbar stays above hero */
}


.logo {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
}

/* Nav links (desktop default) */
.nav-links {
  display: flex;
  list-style: none;
  gap: 4em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.carticon {
  position: relative;
  cursor: pointer;
}

.carticon::after {
  content: attr(data-count);
  position: absolute;
  top: -8px;
  right: -12px;
  padding: 0.2em 0.5em;
  font-size: 12px;
  background-color: #007bff;
  border-radius: 50%;
  color: white;
}

/* Hamburger (hidden by default on desktop) */
.menu-toggle {
  font-size: 26px;
  cursor: pointer;
  display: none;
}

/* ================== Responsive Styles ================== */
@media (max-width: 900px) {
  .menu-toggle {
    display: block; /* show hamburger */
  }

  .nav-links {
    display: none; /* hide by default */
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 1em 0;
    text-align: center;
    gap: 2em;
    transform: none;
  }

  .nav-links.active {
    display: flex; /* show when toggled */
  }

  .nav-links li {
    margin: 0;
  }
}




/*=================================SECTION 1(HERO SECTION)========================*/
/* Hero */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 50px;
  background: #eaf3ff;
  flex-wrap: wrap; /* allows wrapping on smaller screens */
  overflow: hidden;
}

.hero-text {
  flex: 1;
  min-width: 280px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards;
}

.hero h1 {
  font-size: 6rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero button {
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

/* Button hover effect */
.hero button:hover {
  background: #0056b3;
  transform: translateY(-3px);
}

.hero-img {
  flex: 1;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateX(50px);
  animation: fadeRight 1s ease forwards;
  animation-delay: 0.4s; /* image appears after text */
}

.hero-img img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* =================== KEYFRAMES =================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =================== RESPONSIVE =================== */
@media (max-width: 992px) {
  .hero {
    padding: 40px 30px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero button {
    margin-top: 15px;
  }

  .hero-img {
    margin-top: 25px;
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.3s; /* fade up instead of from right on small screens */
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 30px 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero button {
    width: 50%;
  }
}

/*=======================SECTION 2(PRODUCTS SECTION)======================*/
.collection-header h2 {
  text-align: center;
  padding: 0.2em;
  font-size: 2.5em;
  color: #007bff;
}

/* Filters Container */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;   /* allow wrapping on small screens */
  gap: 10px;
  margin: 20px;
}

/* Buttons */
.filters button {
  padding: 10px 18px;
  border: 1px solid #007bff;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
}

/* Hover/Active state */
.filters button:hover {
  background: #007bff;
  color: white;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  .collection-header h2 {
    font-size: 2em;
  }

  .filters button {
    padding: 8px 14px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .collection-header h2 {
    font-size: 1.6em;
  }

  .filters {
    gap: 8px;
  }

  .filters button {
    flex: 1 1 45%; /* buttons take half width */
    min-width: 120px;
    font-size: 0.85em;
  }
}

/* Sections */
section {
  padding: 50px;
  text-align: center;
}
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.product-content {
  background: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.product-content img {
  max-width: 100%;
  border-radius: 10px;
}
.product-content data {
  display: block;
  margin-top: 8px;
  font-weight: bold;
  color: #007bff;
}
.product-content button{
  border: none;
  background-color: #007bff;
  color: white;
  padding: 0.5em 2em;
  border-radius: 10px;
}
.glasses h2{
  color: #007bff;
}
.product-content span{
  color: #007bff;
}


/*==============================About section==========================*/
.About-men {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 6rem;
  background: linear-gradient(135deg, #d0e8ff, #a4c8ff);
  border-radius: 10px;
  overflow: hidden;
  gap: 2rem;
}

.About-text {
  flex: 1;
  max-width: 50%;
  z-index: 2;
}

.About-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #222;
}

.About-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #444;
}

.About-text button {
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.About-text button:hover {
  background: #27ae60;
}

/* Image Section */
.About-img {
  flex: 1;
  max-width: 45%;
  position: relative;
  z-index: 2;
}

.About-img img {
  width: 100%;
  position: relative;
  z-index: 2;
}

.circle-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: #007bff;
  border-radius: 50%;
  z-index: 1;
}

/* Decorative Circle */
.decor-circle {
  position: absolute;
  width: 70px;
  height: 70px;
  top: 30px;
  left: 30px;
  border-radius: 50%;
  background: #007bff;
  opacity: 0.9;
  z-index: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .About-men {
    padding: 2rem 3rem;
    gap: 1.5rem;
  }

  .About-text h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .About-men {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .About-text {
    max-width: 100%;
  }

  .About-img {
    max-width: 80%;
    margin-top: 2rem;
  }

  .decor-circle {
    display: none; /* hide on mobile */
  }
}

@media (max-width: 480px) {
  .About-text h1 {
    font-size: 1.6rem;
  }

  .About-text p {
    font-size: 0.9rem;
  }

  .About-text button {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }
}


/*=================================SECTION 3(Feedback SECTION)=========================*/
.feedback {
  background: #f1f1f1;
  padding: 40px 20px;
  text-align: center;
  position: relative;
}
.feedback h2{
  color: #007bff;
  font-size: 2.5em;
  margin: 0.2em;
}
.slider-container {
  overflow: hidden;
  max-width: 900px; /* 3 cards × 300px each */
  margin: auto;
}

.reviews {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.review {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 250px;         /* card width */
       /* prevents shrinking */
  margin: 0 10px;       /* spacing between cards */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: left;
  flex-shrink: 0;       /* keep size fixed */
}


.review img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.review p {
  font-size: 14px;
  margin-bottom: 10px;
}

.reviewer {
  font-weight: bold;
  color: #444;
  font-size: 13px;
}

/* Slider buttons */
.slider-buttons {
  margin-top: 20px;
}

.slider-buttons button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  margin: 0 5px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

.slider-buttons button:hover {
  background: #555;
}


/*=======================================newsletter section=============================*/
.newsletter {
  background: #eaf3ff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
  flex-wrap: wrap;
  text-align: center;
}

.newsletter-content {
  flex: 1;
  min-width: 280px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards;
}

.newsletter-content h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.newsletter input {
  padding: 12px;
  width: 250px;
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.newsletter button {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.newsletter button:hover {
  background: #0056b3;
}

/* Responsive styles */
@media (max-width: 768px) {
  .newsletter {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-content h2 {
    font-size: 2em;
  }

  .newsletter img {
    max-width: 250px;
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .newsletter-content h2 {
    font-size: 1.8em;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter input,
  .newsletter button {
    width: 100%;
  }
}


/*================= FOOTER SECTION =================*/
.footer {
  background-color: #fff;
  color: #000;
  padding: 2em 1em;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4em; /* smaller gap for flexibility */
  max-width: 1200px;
  margin: auto;
  text-align: left;
}

.content-footer {
  min-width: 200px;
}

.content-footer h4 {
  margin-bottom: 1em;
  font-size: 1.2em;
}

.content-footer p,
.content-footer a {
  font-size: 0.95em;
  color: #333;
}

.content-footer ul {
  padding: 0;
  margin: 0;
}

.content-footer ul li {
  list-style: none;
  margin: 0.5em 0;
}

.content-footer ul li a {
  text-decoration: none;
  color: #000;
  transition: color 0.3s ease;
}

.content-footer ul li a:hover {
  color: #e91e63; /* highlight color on hover */
}

.footer hr {
  margin: 2em auto 1em;
  border: none;
  border-top: 1px solid #ccc;
  width: 90%;
}

.footer p {
  font-size: 0.9em;
  color: #555;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 2em;
    text-align: center;
  }
}


/*==================================cart section========================*/
.cart-container{
  max-width: 800px;
  margin-top: 80px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}
.cart-item { 
      display: flex;
      justify-content: space-between; 
      margin: 10px 0;
      padding: 10px;
      border-bottom: 1px solid #ccc; 
}
.cart-item-details {
        flex: 1;
        min-width: 150px;
}
.cart-item button{
    background-color: #007bff;
    border: none;
    padding: 0.25em 1em;
    border-radius: 10px;
    color: white;
}
.cart-item img {
      width: 100px;
      height: 100px;
      object-fit: cover;
      margin-right: 15px; 
}
.cart-total{
      font-size: 20px;
      margin-top: 20px;
      text-align: right;
      font-weight: bold;
}
.submitBtn{
      padding: 1em 8em; 
      background: #007bff;
      color: #fff;
      border: none;
      cursor: pointer;
      margin-top: 20px;
      border-radius: 10px;
      margin: auto;
      display: block;
}


 .cart-container h1{
  margin-bottom: 20px;
  text-align: center;
  color: #007bff;
  
}
.cartItems{
    display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}
/*===========================================payment section=======================================*/

#paymentPage{
  background: white;
  padding: 2.5rem;
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin-top: 100px;
  width: 100%;
}

#paymentPage h2{
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}
.payment-content label{
  font-size: 1.2rem;
  font-weight: 500;
}
.payment-content input{
  padding: 10px;
  display: block;
  width: 80%;
  margin: 10px 0;
  
}
.payBtn{
    text-align: center;
    padding: 0.8rem;
    font-size: 1.4rem;
    font-weight: 500;
    background-color: #00c79c;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50%;
    margin: auto;
    display: block;
    margin-bottom: 1rem;
    gap: 10px;
}
.payBtn:hover {
    background-color: #009e7c;
    transform: translateY(-2px);
}
.divider{
  text-align: center;
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1.5rem 0;
  position: relative;
}
.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #ddd;
}
  
.divider::before {
    left: 0;
}
  
.divider::after {
    right: 0;
}
.courtesy-content{
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}
.paystackBtn{
    background-color: rgb(79, 171, 247);
    padding: 0.7rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.safaricomBtn{
    background-color: #9ef1b2;
    padding: 0.7rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#proceedDeliveryBtn{
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    border: none;
    width: 50%;
    margin: auto;
    display: block;
    margin-bottom: 1rem;
    gap: 10px;
    color: white;
}
#deliveryForm{
  margin: auto;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0px 5px 15px rgba(7, 7, 7, 0.05);
  padding: 1.5rem;
  background: white;
  margin-top: 50px;
}
#deliveryForm h2{
  text-align: center;
  margin-bottom: -2em;
  font-size: 2rem;
}
#deliveryForm label{
   font-size: 1.2rem;
   font-weight: 500;
  
}
#deliveryForm input{
  padding: 5px;
  display: block;
  width: 80%;
  margin: 10px 0;
}
#deliveryForm button{
      text-align: center;
    padding: 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: #007bff;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50%;
    margin: auto;
    display: block;
    margin-bottom: 1rem;
    gap: 10px;
}

/*============================ORDER FORM=========================*/
#orderForm{
  display: none;
  text-align: center;
    max-width: 800px;
  margin-top: 80px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  
}
#orderForm h3{
  font-size: 3em;
  color: rgb(89, 194, 236);
}
#orderForm input{
  padding: 0.2em 5em;
}
#orderForm input, #orderForm textarea {
      width: 100%;
      margin-top: 10px;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
}
#orderForm button {
    padding: 1em 2em;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 auto;
    display: block;
    margin-top: 40px;
}
#orderForm button:hover {
     background-color: #074c94;
    color: white;
    cursor: pointer;
}
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #007bff;
  color: white;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
#toast.show {
  visibility: visible;
  opacity: 1;
}

/*==========================================popup style==============================*/
/* Overlay background */
#customAlert {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Alert box */
#customAlert .alert-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 300px;
  animation: fadeIn 0.3s ease-in-out;
}

#customAlert .alert-box h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #333;
}

#customAlert .alert-box button {
  margin-top: 15px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #007BFF;
  color: #fff;
  cursor: pointer;
}

#customAlert .alert-box button:hover {
  background: #0056b3;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}