@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap");

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Baloo 2", sans-serif;
}

h1 {
  font-size: 50px;
  line-height: 64px;
  color: #222;
}

h2 {
  font-size: 46px;
  line-height: 54px;
  color: #222;
}

h4 {
  font-size: 20px;
  color: #222;
}

h6 {
  font-size: 12px;
  font-weight: 700;
}

p {
  font-size: 16px;
  color: #465b52;
  margin: 15px 0 20px 0;
}

.section-p1 {
  padding: 40px 80px;
}

.section-m1 {
  padding: 40px 0;
}

body {
  width: 100%;
  font-family: inherit;
}

#header {
  position: fixed;
  width: 100%;
  overflow: hidden;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 80px;
  background-color: #f3f3f6;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
}


/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #efef0f;
  color: white;
}

header .icon {
		background-color: #ffffff;
		display: flex;
		box-shadow: 0 4px 10px rgba(0,0,0,0.1);
		padding: 8px 12px;
		border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
		color: rgb(0, 0, 0);
}

/* IMAGE PRODUIT */
.product-image {
  display: flex;
  justify-content: center;
  background: #efef0f;
  padding: 80px 20px 10px 30px;
}

.product-image img {
  width: 60%;
  max-width: 250px;
		border-radius: 10px;
		box-shadow: 0 4px 10px rgba(0,0,0,0.1);
		margin-bottom: 20px;
}

/* CONTENU */
.product-details {
  background: white;
  border-radius: 30px 30px 20px 20px;
  padding: 40px 20px ;
  margin-top: -20px;
		box-shadow: 0 4px 10px rgba(0,0,0,0.1);
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between
}

.price-cart {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 22px;
  font-weight: bold;
  color: #0d24cf;
}

.cart-btn {
  background: #0d24cf;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 14px;
}

/* MINI IMAGES */
.photos {
  margin: 10px 0;
}



.photos img {
  width: 90px;
  margin-right: 5px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #150cc5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}



/* DESCRIPTION */
.product-name {
  font-weight: bold;
  color: #0d24cf;
  margin: 10px 0 5px;
}

.stars {
  color: #ff1e1e;
}

.description {
  color: #555;
  font-size: 14px;
  margin: 10px 0;
  line-height: 1.5;
		margin-bottom: 20px;
}

/* BOUTON COMMANDER */
.buy-btn {
	display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; 
  text-decoration: none; 
	background: #0d24cf;
	color: white;
	padding: 15px;
	border: none;
	font-size: 16px;	
	border-radius: 30px;
	cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#navbar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity {
  background-color: red;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  position: absolute;
  top: -5px;
  left: -5%;
  height: 14px;
  width: 14px;
  font-size: 9px;
  font-weight: 700;
}

#mobile {
  display: none;
  align-items: center;
}

@media (min-width: 921px){
  #mobile {
    display: none !important;
  }
}

#close {
  display: none;
}

#navbar li {
  list-style: none;
  padding: 0 20px;
  position: relative;
}

#navbar li a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  transition: 0.3s ease;
}

#navbar li a:hover,
#navbar li a.active {
  color: #088178;
}

#navbar li a:hover::after,
#navbar li a.active::after {
  content: " ";
  width: 30%;
  height: 2px;
  background: 2px;
  background-color: #088178;
  position: absolute;
  z-index: 10;
  bottom: -4px;
  left: 20px;
}

.hide_on_web {
  display: none;
}

.toast {
  position: fixed;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #4CAF50;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: none;
}

.toast.show {
  display: block;
}


.livraison-btn {
  position: fixed;
  bottom: 60px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #083fe3;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite
}

.livraison-btn i {
  font-size: 24px;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  flex-direction: row;
  justify-content: center;
  align-items: end;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 1px solid #888;
  width: 100%;
  overflow: auto;
  max-height: 60%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

#close-modal {
  background-color: #c0381d;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#close-modal:hover {
  background-color: #3e8e41;
} 


.card-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
.card-item h3{
    margin: 0;
}
.card-item button{
    background-color: #ff5252;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.card-item button:hover{
    background-color: #ff1744;
}

.quantity-controls{
    display: flex;
    align-items: center;
}
.quantity-controls button{
    background-color: #3f51b5;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin: 0 5px;
}
.quantity-controls input{
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
}
.total-price{
    text-align: center;
    font-size: 20px;
    margin-top: 20px;
}

.checkout {
background-color: #0d24cf;
color: white;
border: none;
border-radius: 20px;
padding: 10px 20px;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.checkout:hover {
  background-color: #0e36f4;
}
.checkout i {
  margin-right: 10px;
}


.search_btn_mobile {
  /* background-color: #e7e4e4; */
  border-radius: 10px;
  border: 1px solid #286dd5;
  padding: 8px 15px;
  font-size: 12px;
  width: 100%;
  outline: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#hero {
  background-image: url("./images/freepik__ecommerce-banner-sunny-outdoor-market-scene-with-a__28343.png");
  height: 70vh;
  width: 100%;
  background-size: cover;
  background-position: top 25% right 0;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
}

#hero h1 {
  color: #088178;
}


#hero h4 {
  padding-bottom: 15px;
}

#product1 {
  text-align: center;
}

#product1 .pro-container {

  display: grid;
  padding-top: 20px;
  /* desktop */
  grid-template-columns: repeat(4, minmax(0, 1fr)); 
  gap: 20px;
}

#product1 .pro {
  width: 100%; 
  min-width: 0;
  border: 1px solid #cce7d0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.02);
  margin: 15px 0;
  transition: 0.2s ease;
  position: relative;
  overflow: hidden;
}



#product .pro:hover {
  box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.06);
}

#product1 .pro img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

#product1 .pro .des {
  text-align: start;
  padding: 10px 10px;
}

#product1 .pro .des span {
  color: #606063;
  font-size: 12px;
}

#product1 .pro .des h5 {
  padding-top: 7px;
  color: #1a1a1a;
  font-size: 14px;
}

#product1 .pro .des i {
  font-size: 12px;
  color: rgb(243, 181, 25);
}

#product1 .pro .des h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1a04e1;
}

#product1 .pro .cart {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50px;
  background-color: #e8f6ea;
  font-weight: 500;
  color: #081081;
  border: 1px solid #cce7d0;
  position: absolute;
  bottom: 20px;
  right: 10px;
}



/*----------------------Media Query ----------*/

@media (max-width: 920px) {
  .section-p1 {
    padding: 40px 40px;
  }

  #hero {
  background-image: url("./images/freepik__ecommerce-banner-sunny-outdoor-market-scene-with-a__28343.png");
  background-size: cover;
  height: 70vh;
  width: 100%;
  background-size: cover;
  background-position: top 25% right 0;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
}

  #navbar {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    right: -300px;
    height: 100vh;
    width: 300px;
    background-color: #e3e6f3;
    box-shadow: 0 40px 60px rgba(0, 0, 0, 0.1);
    padding: 80px 0 0 10px;
    transition: 0.3s;
  }

  #navbar.active {
    right: 0;
    z-index: 999;
  }

  #navbar li {
    margin-bottom: 25px;
  }

  #mobile {
    display: flex;
    align-items: center;
  }
  #mobile i {
    font-size: 20px;
    color: #1a1a1a;
    padding-left: 20px;
  }
  body #lg-bag {
    display: none;
  }


  /* Gestion du bouton de fermeture */
  li:has(#close){
    width: 100%
  }
  #close {
    display: initial;
    position: absolute;
    top: -40px;
    right: 20px;
    color: #222;
    font-size: 32px;
  }
  #close .fa-times {
    font-size: 20px;
  }

  #lg-bag {
    display: none;
  }

  .quantity {
    top: 15px;
    left: 85%;
  }

  #hero {
    height: 70vh;
    padding: 0 80px;
    background-position: top 30% right 30%;
  }

  #feature {
    justify-content: center;
  }

  #feature .fe-box {
    margin: 15px 15px;
  }

  #product1 .pro-container {
     grid-template-columns: repeat(3, 1fr);
  }

  #product1 .pro {
    margin: 15px;
  }

  #banner {
    height: 25vh;
  }

  #sm-banner .banner-box {
    min-width: 100%;
    height: 30vh;
  }

  #banner3 {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .section-p1 {
    padding: 20px;
  }

  #hero {
  background-image: url("./images/freepik__ecommerce-banner-sunny-outdoor-market-scene-with-a__28343.png");
  background-size: cover;
  height: 40vh;
  width: 100%;
  background-size: cover;
  background-position: top 25% right 0;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
}

  #header {
    padding: 10px 30px;
  }

  .hide_on_web {
  display: block;
}

  .quantity {
    top: -7px;
    left: 9px;
  }

  #hero {
    padding: 0 20px;
    background-position: 55%;
  }

  h2 {
    font-size: 30px;
  }

  h1 {
    font-size: 28px;
  }

  p {
    line-height: 24px;
  }
  #product1 .pro {
    width: 100%;

  }
  footer .copyright {
    text-align: start;
  }
  
   #product1 .pro-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    justify-items: center;
  }

   #product1 .pro img {
    height: 150px;  
  }
   .category {
    /* width: 40%; */
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    height: 40px;
    text-align: center;
    /* padding: 0 10px; */
    font-size: 14px;
    margin: auto;
  }
}

/* ---------- Search responsive minimal ---------- */
/* Cacher l'icône/contrôle par défaut (on cible le div qui contient l'icône) */
#search-icon { display: none; cursor: pointer; }

/* Par défaut (desktop & tablette) : afficher l'input */
.search_btn_mobile { display: inline-block; width: 320px; }

/* Sur petits écrans : cacher l'input et afficher l'icône loupe */
@media (max-width: 768px) {
  .search_btn_mobile { display: none; } /* input inline caché sur mobile */
  #search-icon { display: inline-flex; align-items:center; justify-content:center;}
}

/* Styles pour l'état "search open" (remplace cart + menu) */
.header-search-open .search_btn_mobile_mobileview {
  display: flex !important;
  width: 100%; /* adapte selon l'espace */
  max-width: 420px;
  margin: 0 12px;
  padding: 5px 12px;
  border-radius: 10px;
  background: #fff;
  outline: none;
}

/* bouton croix mobile */
#search-close-btn {
  display: inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  margin-left:6px;
  border-radius:6px;
  cursor:pointer;
  background:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,0.06);
}

@media (max-width: 470px){
  .product-price-sect{
    display: block !important;
  }
  #product1 .pro .cart{
    bottom: 10px;
  } 
}
