:root {
  --background-color: #dad7cd;
  --cart-background-color: #adc7a988;
  --text-color2: #f0f8ff;
  --text-color1: black;
  --text-color3: #083a18;
  --text-color4: gray;
  --headr-bar-color: #3a5a45;
  --helper-color: #578164;
  --helper-color-1: #57816473;
  --nav-color: linear-gradient(
    to right,
    var(--helper-color),
    var(--headr-bar-color),
    var(--helper-color-1)
  );
}
.dark-mod {
  --background-color: #121212;
  --cart-background-color: #2b2e3188;
  --text-color1: #e0e7e0;
  --text-color2: #ffffff;
  --text-color3: #22ee63;
  --text-color4: rgb(221, 221, 221);
  --headr-bar-color: #0f1414;
  --helper-color: #000000;
  --helper-color-1: #242424;
  --nav-color: linear-gradient(
    to right,
    var(--helper-color),
    var(--headr-bar-color),
    var(--helper-color-1)
  );
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
/*header*/
body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background-color: var(--background-color);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}
li {
  list-style: none;
}

#active {
  border-bottom: 2px solid white;
  border-width: fit-content;
}
.nav-bar {
  background-color: var(--headr-bar-color);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 90%;
  margin-left: 5%;
  border-radius: 15px;
  margin-top: 15px;
  background-image: var(--nav-color);
  justify-content: space-between;
  gap: 8vw;
  padding: 0 2rem;
}
.logo {
  padding: 1.1rem;
  font-size: 32px;
  font-weight: bolder;
  color: var(--text-color2);
  justify-items: flex-start;
  flex: 1;
  text-align: canter;
}
.nav-list {
  color: var(--text-color2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-right: auto;
  justify-items: center;
}
.home {
  color: var(--text-color2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-right: auto;
  justify-items: center;
  margin-right: 16vw;
}
.list-item {
  padding: 2rem;
  font-size: large;
  font-weight: bold;
  display: inline-block;
  transition: all 0.5s ease;
}

.list-item:hover {
  transform: translateY(-4px);
  color: var(--text-color3);
}
.icons {
  display: flex;
  align-items: center;
  gap: 2vw;
  flex: 1;
  margin-right: 4vw;
}
.icons svg {
  fill: var(--text-color2) !important;
  transition: all 0.5s;
  display: flex;
  justify-content: flex-end;
  width: 24px;
  height: 24px;
}
.icons svg:hover {
  transition: 0.5s;
  transform: translateY(-4px);
  fill: var(--text-color3) !important;
}
.icons a {
  text-decoration: none;
  display: flex;
  justify-content: center;
}
#faq-link {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0 10px;
  transition: 0.3s;
}

#faq-link:hover {
  color: var(--text-color3);
  opacity: 0.8;
}

/*theme button*/
#theme-switch {
  height: 50px;
  width: 50px;
  padding: 0;
  border: 50%;
  border-radius: 100px;
  background-color: var(--helper-color);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 10px;
  right: 20px;
  margin: 0;
  flex-shrink: 0;
}
#theme-switch img {
  fill: var(--background-color);
}
#theme-switch img:last-child {
  display: none;
}
.dark-mod #theme-switch img:first-child {
  display: none;
}
.dark-mod #theme-switch img:last-child {
  display: block;
}
/*cart main*/
.cart {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
  margin: 20px;
  margin-bottom: 250px;
}

.cart-left {
  flex: 3;
  min-width: 0;
  background: var(--cart-background-color);
  padding: 20px;
  margin-left: 60px;
  margin-top: 100px;
  border-radius: 8px;
}
.table-header {
  display: flex;
  font-weight: bold;
  font-size: 1.3rem;
  padding-bottom: 10px;
  color: var(--text-color2);
}
hr {
  border: none;
  height: 2px;
  background-color: var(--text-color3);
  margin: 10px 0 20px 0;
}
.prod {
  flex: 3;
}
.price {
  flex: 1;
  text-align: center;
}
.qty {
  flex: 1;
  text-align: center;
}
.total {
  flex: 1;
  color: var(--text-color2);
  text-align: center;
}
.product-row {
  display: flex;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--text-color3);
}
.cart-img {
  width: 100px;
  height: 120px;
  border-radius: 5px;
  object-fit: cover;
  margin-right: 15px;
}
.product-info {
  display: flex;
  align-items: center;
}
.bn {
  color: var(--text-color2);
  font-weight: bold;
  font-size: 14px;
}
.brand {
  font-size: 12px;
  color: var(--text-color2);
}
.item-price {
  color: var(--text-color2);
  flex: 1;
  text-align: center;
}
.item-qty {
  flex: 1;
  text-align: center;
}
.product-row .total {
  flex: 1;
  text-align: center;
}

.qty-selector {
  display: inline-flex;
  border: none;
  background: var(--helper-color);
}
.qty-selector button {
  width: 30px;
  border: none;
  border-radius: 2px;
  color: var(--text-color2);
  background: var(--helper-color);
  cursor: pointer;
}
.qty-selector input {
  width: 35px;
  text-align: center;
  border-left: 1px solid var(--helper-color);
  border-right: 1px solid var(--helper-color);
  border-top: none;
  border-bottom: none;
}
.remove-item {
  position: relative;
  right: 0;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-color2);
}
.shipping-banner {
  background: var(--helper-color-1);
  color: var(--text-color2);
  width: 100%;
  border-radius: 10px;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  font-weight: bold;
}
.cart-right {
  flex: 1;
  min-width: 320px;
  color: var(--text-color2);
  background: var(--cart-background-color);
  padding: 20px;
  margin-right: 60px;
  margin-top: 100px;
  border-radius: 8px;
}


.summary-box h2 {
  font-size: 18px;
  border-bottom: 3px solid var(--text-color3);
  border-radius: 2px;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.summary-line {
  color: var(--text-color2);
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-weight: bold;
}
.coupon-box {
  color: var(--text-color2);
  display: flex;
  justify-content: space-between;
  border-radius: 15px;
  margin: 25px 0;
}
.coupon-box input {
  width: 150px;
  border-radius: 5px;
  padding: 10px;
  margin: 0 10px;
  border: 1px solid var(--text-color1);
}
.coupon-box p {
  font-size: 11px;
  color: var(--text-color2);
}

.total-line {
  border-top: 1px solid var(--text-color3);
  padding-top: 15px;
  font-size: 20px;
}
.secure-text {
  color: var(--text-color2);
}
.pay-placeholder {
  color: var(--text-color2);
}

.checkout-btn,
.continue-btn {
  width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
  background: var(--helper-color);
  color: white;
  transition: all 0.2s ease;
}
.checkout-btn:hover,
.continue-btn:hover {
  background-color: var(--text-color3);
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.cart-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
/*footer*/
footer {
  width: 100%;
  background-image: var(--nav-color);
  color: white;
  padding: 100px 0 30px;
  border-radius: 125px 125px 0 0;
  font-size: 13px;
  line-height: 20px;
}

.footer-row {
  width: 85%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.col {
  flex: 1;
  padding: 10px;
}

.footer-logo {
  font-size: 30px;
  margin-bottom: 20px;
}

.col h3 {
  width: fit-content;
  margin-bottom: 40px;
  position: relative;
}

.col p {
  margin-bottom: 10px;
  color: var(--text-color2);
}

.underline {
  width: 100%;
  height: 5px;
  background: var(--text-color4);
  border-radius: 3px;
  position: absolute;
  margin-top: 8px;
  overflow: hidden;
}
.underline span {
  width: 15px;
  height: 100%;
  background: var(--text-color2);
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 10px;
  animation: moving 2s linear infinite;
}
@keyframes moving {
  0% {
    left: -20px;
  }
  100% {
    left: 100%;
  }
}
.newsletter-form {
  background: transparent;
  padding-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid white;
  margin-bottom: 50px;
  max-width: 250px;
}
.mail-icon {
  color: white;
  margin-right: 10px;
  font-size: 18px;
}
#footer-email {
  background: transparent;
  border: none;
  color: white;
  outline: none;
  flex: 1;
}
#footer-email::placeholder {
  color: rgba(255, 254, 254, 0.7);
}

.newsletter-form input {
  width: 100%;
  background: transparent;
  color: var(--text-color2);
  border: 0;
  outline: none;
  margin-left: 10px;
}
.newsletter-form button {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-color2);
  cursor: pointer;
  font-size: 18px;
}

/* social.icons */

.social-icons div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  transition: 0.3s;
  background-color: transparent;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.social-icons svg {
  width: 22px;
  height: 22px;
  fill: rgb(0, 0, 0);
  transition: 0.3s ease;
}

.social-icons a:hover svg {
  transform: translateY(-3px);
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #000;
  text-align: center;
  line-height: 40px;
  font-size: 20px;
  cursor: pointer;
}

.footer-line {
  width: 90%;
  border: 0;
  border-bottom: 1px solid var(--text-color3);
  margin: 20px auto;
}

.copyright {
  text-align: center;
}


/* Overlay */
#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.checkout-form {
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  padding: 40px;
  border-radius: 20px;
  width: 450px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: popUp 0.4s ease;
}

.checkout-form h2 {
  margin-bottom: 20px;
  color: var(--helper-color);
  font-size: 28px;
  font-weight: bold;
}

.checkout-form input, .checkout-form textarea {
  width: 100%;
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  transition: 0.3s;
}

.checkout-form input:focus, .checkout-form textarea:focus {
  border-color: var(--text-color3);
  box-shadow: 0 0 8px var(--text-color3);
  outline: none;
}

.checkout-form button {
  background: var(--helper-color);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 15px;
  font-size: 16px;
  font-weight: bold;
  transition: 0.3s;
}

.checkout-form button:hover {
  background: var(--text-color3);
  transform: scale(1.05);
}

@keyframes popUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/*رسالة الشكر*/
.thank-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, #ffffff, #f9f9f9);
  color: var(--helper-color);
  padding: 30px 50px;
  border-radius: 20px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 2000;
  opacity: 0;
  transition: all 0.4s ease;
}

.thank-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* زرار ال scroll */
#up {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(to right, #578164, #3a5a45);
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: none; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: 0.3s;
}
#up:hover {
  transform: scale(1.1);
  background: black;
}
