/* Whiskers and Wag Tails - part 2 CSS Stylesheet*/

/* CSS reset*/
*{
  margin: 0 ;
  padding: 0;
  box-sizing: border-box;
}

/*default styles*/
html,body {
  width: 100%;
  font-family: 'Roboto', sans-serif;  /*font matches the proposal*/
  font-size: 16px; 
  line-height: 1.5;
  color: #4CAF50;  
  background-color: #F5F5DC;  
   /* prevents horizontal scrolling*/
}
/* Ensure images never overflow and keep aspect ratio */
img, .hero-image, .product-item img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*Typograph styles*/
h1, h3, h4 {
  font-weight: 700;
  color:#4CAF50;
  margin-bottom: 1rem;
}
 
h1 {font-size: 6rem;}
h3, h4 {font-size: 2rem; font-weight: 500;}
p{
  font-size: 1rem; /*paragraph text*/
  line-height: 1.6;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

/*Layout structure*/
header{
  background-color: #FFFFFF;
  padding: 0.5rem 0;
  border-bottom: 2px solid #4CAF50 ; /* the three elements inside stands for width, style, color*/
  position: sticky;/*stays in the same position*/
  top: 0;
  left: 0;
  right: 0px;
  z-index: 1000; /*ensure it stays above other content*/
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); /*Subtle shadow*/
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;  /* use flebox for alignment*/
  flex-direction: row;
  justify-content: space-between; /*space between logo, search and nav*/
  align-items: center; /* vertically center items*/
}

.left-section {margin-right: 10px;}
.logo img {
  vertical-align: middle;
  max-width: 150px;
}

/* styling the search button */
.middle-section{
  display: flex;
  margin: 0 1rem;
  max-width: 700px;
  align-items: center;

}

.search-container {
  display: flex;
  align-items: center;
  border: 2.1px solid #4CAF50;
  border-radius: 5px;
  background-color: #FFFFFF;
  overflow: hidden; /*keeps everything inside*/
  height: 36px;
}

.search-bar{
  flex: 1;
  height: 36px;
  padding-left: 0.5rem;
  font-size: 1rem;
  border-radius: 0;
  box-shadow: none;
  width: 410px;
  border: none;
  outline: none;
}

.search-bar::placeholder{font-family: Roboto,sans-serif; font-size: 1rem; }

.search-button,.voice-search-button{
  height: 36px;
  width: 36px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background-color: #F5F5DC;
}

.search-button img, .voice-search-button img { max-height: 20px; }

.search-button .tooltip, 
.voice-search-button .tooltip{
  font-family: Roboto,sans-serif;
  position: absolute;
  background-color: #9E9E9E;
  color: #FFFFFF;
  padding: 4px 6px;
  border-radius: 2px;
  font-size: 12px;
  bottom: -30px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  white-space: nowrap;
}

.search-button:hover .tooltip,.voice-search-button:hover .tooltip{ opacity: 1; }

/* Navigation and Contact Button Styles*/
 nav ul {
  display: flex;
  align-items: center ;
  list-style: none;
 }

 nav ul li { margin: 0 0.2rem; }/* this a descendant sectore because <li> that's inside a <ul> which is inside a <nav>*/

 main{
  width: 100%;
  padding: 20px 1rem 1rem;
 }

 footer{
  text-align: center;
  padding: 1rem;
  background-color: #4CAF50;
  color: #FFFFFF;
  border-top: 2px solid #FFFFFF;
  width: 100%;
 }

/*Decoration and colour*/
.hero{ width: 100%; padding-top: 60px; }

.hero-text {
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 1rem;
  min-height: 300px; 
  margin-top: -10rem;
  /* Use gradient with animation for a dynamic background effect */
  background: linear-gradient(135deg, #E8F5E9, #F9FDF9);
  background-size: 200% 200%;
  /* Apply the gradientShift animation for 5 seconds, easing in and out, looping infinitely */
  animation: gradientShift 5s ease infinite;
}

.hero-image {
  display: block;
  max-width: 100%;
  max-height: 10%;
  object-fit: cover;
  padding-bottom: 60px;
  
}

.hero-actions{text-align: center;padding-top: -1rem;}

.cta-button{
  background-color: #000000;
  color: #FFFFFF;
  padding: 0.5rem 1.2rem;
  border: 3px solid #000000 ;
  border-radius: 20px;
  text-decoration: none ;
  font-weight: 500;
  display: inline-block;
  cursor: pointer;
}

.cta-button .fas {margin-right: 0.5rem;}

.cta-button:hover{
  opacity: 0.7;
  box-shadow: 2px 10px 10px rgba(0, 0, 0, 0.15);
}

.cta-button:active{opacity: 0.9;}

.learn-more {
  display: inline-block;
  margin-right: 2rem;
  text-decoration: underline;
} 

.learn-more:hover {color: #8D6E63;transition: color 0.3s;}
  
nav ul li a { /*descendant selector*/
  text-decoration: none;
  color: #4CAF50 ;
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  }

  nav ul li a:hover { color: #8D6E63; border-bottom: 2px solid #8D6E63;} /* the color brown when a curose hover on the links*/
  
 .contact-button{
  background-color: #D32F2F;
  color:#FFFFFF;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width:auto
 }

 .contact-button:hover {
  color: #FFFFFF;
  background-color: #B71C1C;
  transition: background-color 0.3s;
 }

 /*Featured products styles*/
 #featured-products {padding: 2rem 1rem;margin-bottom: 1rem; }

 #featured-products h3 {text-align: center;margin-bottom: 1rem; }

 .products-container{
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 0 auto;
 }

 .product-item {
  flex: 1 ; /*equal width for each item*/
  background-color: #FFFFFF;
  background: linear-gradient(135deg, #E8F5E9, #F9FDF9);
  background-size: 200% 200%;
  /* Apply the gradientShift animation for 5 seconds, easing in and out, looping infinitely */
  animation: gradientShift 5s ease infinite;
  border-radius: 12px;
  padding: 0rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  max-width: 50%; /*ensures the two items fit evenly*/
 }

 .product-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5rem;
 }

 .product-item p{font-size: 1.1rem; color: #9E9E9E; }

 /*pet tip and testimonials styles*/
 #pet-tip, #testimonials {
  padding: 2rem 0;
  background-color: #FFFFFF;
  margin-bottom: 1rem;
 }

.tip-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: #E8F5E9;
  border: 1px solid #4CAF50;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.tip-box p {font-size: 1.1rem;line-height: 1.6;color: #9E9E9E;}

.tip-icon {max-width: 50px;margin-bottom: 1rem; font-size: 2rem;}

.testimonial-box {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: #E8F5E9;
  border: 1px solid #4CAF50;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: centre;
  /* Use gradient with animation for a dynamic background effect */
  background: linear-gradient(135deg, #E8F5E9, #F9FDF9);
  background-size: 200% 200%;
  /* Apply the gradientShift animation for 5 seconds, easing in and out, looping infinitely */
  animation: gradientShift 5s ease infinite;
}

.quote {
  font-size: 1.2rem;
  font-style: italic;
  color: #9E9E9E;
  margin-bottom: 0.5rem;
  position: relative;
}

.quote::before {
  content: "\201C";
  font-size: 2rem;
  position: absolute;
  left: -1.5rem;
  top: -0.5rem;
  color: #4CAF50;
}

.author {
  font-size: 1rem;
  color: #666666;
  font-style: italic;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .header-container{flex-direction: column; padding: 1rem;}
  .middle-section{margin: 1rem 0; max-width: 100%;}
  .nav ul {flex-direction: column; gap: 0.5rem;}
  .search-bar {width: 100%;}
  .hero-text h1 {font-size: 4rem;}
  .hero-text h3 {font-size: 1.5rem;}
  .products-container {flex-direction: column;}
  .product-item{max-width: 100%;}
  .hero-image, .product-item img {max-width: 100px; height: auto;}
}

@media (max-width: 480px) {
  .hero-text h1 {font-size: 2.5rem;}
  .hero-text h3 {font-size: 1.2rem;}
  .hero-image{max-height: 200px;}
  #product-grid {grid-template-rows: 1fr;}
  .products-container{gap: 1rem;}
  .hero-image, .product-item img {max-width: 100%; height: auto; margin: 0;} 
}

/*About page styles*/
.dog-cat-image {
  width: 100%;
  max-height: 1400px;
  height: auto;
  display: block;
  object-fit: cover;
}

.story-section {position: relative; padding: 2rem 0;}

.story-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #E8F5E9;
  border: 2px solid #4CAF50;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.content-item{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background-color: #E8F5E9;
  border: 3px solid #4CAF50;
  border-radius: 10px;
  padding-bottom: 10px;
  margin-top: 20px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.content-item.reverse {flex-direction: row-reverse;}

.section-image {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  padding: 1rem;
}
 
.dogs-owner-image {
  max-width: 100%;
  height: auto;
  width: 600px;
  max-height: 500px;
  object-fit: cover;
  padding: 1rem;
}

.cat-image {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  width: 500px;
  object-fit: cover;
  padding: 1rem;
}

.section-text {
  padding: 1rem; 
  text-align: center; 
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-text .fas {margin-right: 0.5rem;}

/*responsive designs*/
@media (max-width:768px) {
  .content-item{grid-template-columns: 1fr 1fr;}
  .dog-cat-image{max-height: 400px;}
  h1 {font-size: 2.5rem;}
}

@media (max-width: 480px) {
  .content-item {padding: 1rem;}
  .dog-cat-image, .section-image, .dogs-owner-image, .cat-image {max-height: 250px;}
  h1 {font-size: 2rem;}
}


/*products page styles*/
.product-hero{
  position: relative;
  width: 100%;
  margin-top: 0;
  padding-top: 20px;
}

.product-intro{
  text-align: center;
  padding: 1rem;
  color:#4CAF50;
  margin: 0;
}

.product-intro h1 {font-size: 4rem;margin-bottom: 0.5rem;}

.product-intro p {
  font-size: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

#product-grid{
  background-color: #E8F5E9;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0 auto;
  align-items: stretch;
}

.product-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s;
}

.product-card:hover {transform: translateY(-5px);}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.product-details{
  padding: 1rem 0;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 500;
  color: #4CAF50;
  margin-bottom: 0.5rem;
}

.product-recipe p {
  font-size: 1rem;
  color: #666666;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4CAF50;
  margin-bottom: 1rem;
}

.add-to-cart{
  background-color: rgb(255, 216, 20);
  padding: 0.5rem 1.5rem;
  border-radius: 13px;
  border:2px  solid rgb(255, 216, 20);
  font-weight: bold;
  cursor: pointer;
  margin-right: 0;
  transition: 0.15s;
}

.add-to-cart .fas {
  margin-right: 0.5rem;
}
.add-to-cart:hover{
  background-color: rgb(250, 189, 34);
  color: black;
}
.add-to-cart:active{
  opacity: 0.5;
}

/*responsive design */
@media (max-width: 768px) {
  #product-grid{grid-template-columns: repeat(2, 1fr);}
  .product-intro h1 {font-size: 2.5rem;}
  .product-intro p {font-size: 1.1rem;}
}

@media (max-width: 480px) {
  #product-grid {grid-template-columns: 1fr;}
  .product-intro h1 {font-size: 2rem;}
  .product-intro p {font-size: 1rem;}
  .product-card img {height: 50%;}
}

/*checkout page styles*/
.checkout-progress {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.progress-step{
  padding: 0.5rem 1rem;
  background-color:  #E0E0E0;
  border-radius: 15px;
  color: #9E9E9E;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.progress-step.active{background-color: #4CAF50; color:#FFFFFF;}

.progress-step .fas{margin-right: 0.5rem;}

.checkout-container {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 2rem auto;
  gap: 2rem;
}

.checkout-form-card, .order-summary-card {
  flex: 1;
  background: linear-gradient(135deg, #E8F5E9, #FFFFFF);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite; /* apply the gradientshift animation for 5seconds easing in and out*/
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.checkout-form-card:hover, .order-summary-card:hover {
  transform: translateY(-5px);
}

.checkout-form-card h3, .order-summary-card h3 {
  color: #4CAF50;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.form-group{ margin-bottom: 1.5rem;}

.form-group label{
  display: block;
  font-weight: 500;
  color: #666666 ;
  margin-bottom: 0.5rem;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #4CAF50;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.submit-button{
  background-color: #4CAF50;
  color: #FFFFFF;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  width: 100%;
}

.submit-button:hover {
  background-color: #9E9E9E;
  transform: scale(1.05);
}

.submit-button:active{ transform: scale(0.98);}

.confirmation-message{
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 5px;
  display: none;
}

.confirmation-message.show {
  display: block;
  background-color: #E8F5E9;
  color: #2E7D32;
  text-align: center;
}

.order-summary-card .summary-content {padding: 1rem 0;}

.order-summary-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.order-summary-card li{
  padding: 0.5rem 0;
  color: #666666;
}

.order-summary-card .total-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4CAF50;
}

/*Responsive Design*/
@media (max-width: 768px) {
  .checkout-container{flex-direction: column;}
  .checkout-form-card, .order-summary-card{margin-bottom: 2rem;}
  .product-intro h1 {font-size: 2rem;}
  .product-intro p {font-size: 1rem;}
}

@media (max-width: 480px) {
  h1 {font-size: 1.5rem;}
  .form-group input, .form-group select, .form-group textarea {font-size: 0.875rem;}
}


/*contact page styles*/
.contact-details-container {
  display: flex;
  justify-content: space-between;
  max-height: 1200px;
  margin: 0 auto 2rem;
  gap: 2rem;
  border: none;
}

.contact-image img {
  width: 100%;
  height: auto;
  max-height: 26.25rem;
  object-fit: cover;
}

.contact-info {flex: 1; padding: 1rem;}

.contact-info h2 {
  color: #4CAF50;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.contact-info p {
  font-size:1.1rem ;
  color: #9E9E9E;
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: #4CAF50;
  text-decoration: none;
}

.contact-info:hover {text-decoration: underline;}

.contact-form-section{
  max-width: 50rem;
  margin: 0 auto 2rem;
  background: linear-gradient(135deg, #E8F5E9, #FFFFFF);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.location-section{
  text-align: end;
  margin-bottom: 2rem;
}

.location-section img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.location-section p {
  font-size: 0.9rem;
  color: #9E9E9E;
  margin-bottom: 0.5rem;
}

.directions-link {
  color: #4CAF50;
  text-decoration: none;
  font-weight: 500;
}

.directions-link:hover {text-decoration: underline;}

/*defines an animation called gradientshift to create a moving background effect*/
@keyframes gradientShift {
  0% {background-position: 0% 0%;}
  50% {background-position: 100% 100%;}
  100% {background-position: 0% 0%;}
}

/* responsive design*/
@media (max-width: 768px) {
  .contact-details-container{flex-direction: column;}
  .contact-image img {max-height: 12.5rem;}
  h1 {font-size: 2rem;}
  h4 {font-size: 1.2rem;}
  .form-card .fas {font-size: 1.5rem;}
  .contact-form-section{max-width: 100%;}
  body {font-size: 1.1rem;}
  .container {display: block;}
  img {width: 100%;}
}

@media (max-width: 480px) {
  body{font-size: 1rem;}
  nav{flex-direction: column;}
  img{width: 100%;}
  h1 {font-size: 1.5rem;}
  h4{font-size: 1rem;}
  .form-group input, .form-group textarea {font-size: 0.875rem;}
}

 /*part 3 css sytles*/
.accordion-btn{
  width: 100%;
  background: #4CAF50;
  color: white;
  padding: 15px;
  text-align: left;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel {
  padding: 0 15px;
  background: #E8F5E9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.panel.show {
  max-height: 300px;
  padding: 15px;
}

.cart-li { position: relative; }
#cartBadge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e63946;
  color: white;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*error msg styles*/
.error-msg {
  color: #D32F2F;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.confirmation-message.show {
  display: block;
  background: #E8F5E9;
  color:#2E7D32;
  padding: 1rem;
  border-radius: 5px;
  text-align: center;
  margin-top: 1rem;
}

/* FLOATING CART BUTTON - BOTTOM LEFT */
.floating-cart {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  cursor: pointer;
}

.cartIcon {
  width: 50px;
  height: 50px;
  background: #4CAF50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
  transition: transform 0.3s;
}

.cartIcon:hover {
  transform: scale(1.1);
}

.floating-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e63946;
  color: white;
  font-size: 0.8rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #E8F5E9;
  color: #4CAF50;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}



@keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* FLY IN ANIMATION — JavaScript will trigger this */
@keyframes flyIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-flyin {
  animation: flyIn 0.8s ease-out forwards;
}

/*scroll to top button */
#scrollTopBtn{
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none;

}

