html {
  scroll-behavior: smooth;
}

body {
  text-transform: capitalize;
  font-family: var(--font-family);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: 0.3s;
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

.container {
  max-width: 1024px;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.grid {
  display: grid;
}

.section:first-of-type {
  padding: 9.5rem 0 2rem;
}
.section {
    padding: 3rem 0 2rem ;
}

.section-title {
  font-size: var(--h2-font-size);
  direction: rtl;
  color: var(--grano-main-color);
}
.dark-theme .section-title {
    color: var(--grano-sec-color);
}
.section-title span {
  color: var(--shakespeer-second-color);
  direction: rtl;
}

.dark-theme .section-title span {
  color: var(--velvet-second-color);
}

.section-subtitle {
  display: block;
  font-size: var(--small-font-size);
  color: var(--second-color);
  direction: rtl;
}

.main {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 24px;
}

input,
button {
  font-family: var(--body-font);
  outline: none;
  border: none;
}

/* Theme Styles */
.change-theme {
  font-size: 1.25rem;
  color: var(--grano-main-color);
  cursor: pointer;
  transition: 0.3s;
}

.dark-theme .change-theme {
  color: var(--grano-sec-color);
}

/* Dark Theme Variables */
body.dark-theme {
  --first-color: #f9e0bb;
  --second-color: #cc7f47;
  --title-color: hsl(228, 8%, 95%);
  --text-color: hsl(228, 8%, 70%);
  --border-color: hsl(228, 16%, 14%);
  --body-color: hsl(228, 12%, 8%);
  --container-color: hsl(228, 16%, 12%);
}

.dark-theme .nav-menu,
.dark-theme .home-img,
.dark-theme .popular-card:hover,
.dark-theme .scrollup {
  box-shadow: none;
}

.dark-theme .subscribe-container {
  border: 6px solid var(--border-color);
}

.dark-theme .subscribe-description {
  color: var(--text-color);
}

.dark-theme::-webkit-scrollbar {
  background-color: hsl(228, 4%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb {
  background-color: hsl(228, 4%, 25%);
}

/* Base Styles */
* {
  padding: 0;
  margin: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}

:root {
  --grano-main-color: #67347f;
  --grano-sec-color: #ffe500;
  --velvet-main-color: #804096;
  --velvet-second-color: #58595d;
  --twixi-black-color: black;
  --eng-font: "Poppins", sans-serif;
  --font-family: "El Messiri", sans-serif;
  --header-height: 3.5rem;
  --first-color: #8e3200;
  --first-color-alt: hsl(228, 66%, 47%);
  --first-color-light: hsl(228, 62%, 59%);
  --first-color-lighten: hsl(228, 100%, 97%);
  --second-color: hsl(25, 83%, 53%);
  --title-color: hsl(228, 57%, 28%);
  --text-color: hsl(228, 15%, 50%);
  --text-color-light: hsl(228, 12%, 75%);
  --border-color: hsl(228, 99%, 98%);
  --body-color: #fff;
  --container-color: #fff;
  --shakespeer-main-color: #805c25;
  --shakespeer-second-color: #312414;
  --adam-flowers-main-color: #68004b;
  --star-hooms-main-color: #574739;
  --star-hooms-sec-color: #9c6737;
  --BLOOME-hooms-main-color: #ae9250;
  /* Typography */
  --biggest-font-size: 2.25rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;

  /* Font weights */
  --font-medium: 500;
  --font-semi-bold: 600;

  /* z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
}

@media screen and (min-width: 1024px) {
  :root {
    --biggest-font-size: 4rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

/* Header & Navigation */
.header {
  /* padding: 0 10px; */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: var(--z-fixed);
  transition: 0.3s;
  font-family: "Poppins", sans-serif;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: #c38054c8;
  display: inline-flex;
  align-items: center;
  column-gap: 0.25rem;
  font-weight: var(--font-medium);
  transition: 0.3s;
}

.dark-theme .nav-logo {
  color: #fff;
}

.nav-logo i {
  font-size: 1rem;
}

.nav-logo:hover {
  color: var(--first-color);
}

@media screen and (max-width: 1023px) {
  .nav-menu {
    position: fixed;
    bottom: 1rem;
    background-color: var(--container-color);
    box-shadow: 0 8px 24px hsla(228, 66%, 45%, 0.15);
    width: 90%;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 0.8rem 1.4rem;
    border-radius: 1.25rem;
    transition: 0.4s;
  }

  .nav-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-link {
    color: var(--text-color);
    display: flex;
    padding: 0.5rem;
    border-radius: 50%;
  }

  .nav-link i {
    font-size: 1.25rem;
  }

  .nav-link span {
    display: none;
  }
}

.scroll-header {
  background-color: var(--body-color);
  box-shadow: 0 1px 4px hsla(228, 4%, 15%, 0.1);
}

.scroll-header .nav-logo {
  color: var(--first-color);
  font-family: var(--eng-font);
}

.active-link {
  background: #8e3200;
  color: #fff;
  box-shadow: 0 4px 8px hsla(228, 66%, 45%, 0.25);
  transition: 0.3s;
}

.dark-theme .active-link {
  background-color: #c38154;
}

/* Home Section */
.home {
  background-color: white;
  padding-bottom: 0;
  height: 80vh;
}

.dark-theme .home {
  background: linear-gradient(170deg, hsl(0, 0%, 22%) 0%, hsl(0, 0%, 6%) 30%);
}

.home-container {
  padding-top: 1rem;
}

.home-title {
  font-size: var(--biggest-font-size);
  line-height: 120%;
  margin-bottom: 1rem;
  direction: rtl;
  color: var(--shakespeer-second-color);
}

.dark-theme .home-title {
  color: white;
}

.home-description {
  direction: rtl;
  margin-bottom: 30px;
  color: var(--velvet-second-color);
}

.home-description:nth-child(3) {
  margin-bottom: 1rem;
  font-size: 12px;
}

.home-description span {
  font-family: var(--eng-font);
  direction: rtl;
}

.dark-theme .home-description {
  color: white;
}

.home-images {
  position: relative;
  display: flex;
  justify-content: center;
}

.home-img {
  position: absolute;
  width: 275px;
  height: 300px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  bottom: -1.5rem;
}

/* Button Styles */
.button {
  display: inline-block;
  background-color: #956c50;
  color: #fff;
  padding: 14px 28px;
  border-radius: 0.5rem;
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  box-shadow: 0 4px 8px hsla(228, 66%, 45%, 0.25);
  transition: 0.3s;
  cursor: pointer;
}

.nav-boutton {
  display: none;
}

/* Subscribe Section */
.subscribe {
  padding: 2.5rem 0;
}

.subscribe-container {
  background-color: white;
  padding: 3rem 2rem;
  border-radius: 1.25rem;
  text-align: right;
  border: 6px solid var(--border-color);
}

.subscribe-title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 1rem;
}

.subscribe-description {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.subscribe-description span {
  color: var(--second-color);
}

/* Popular Section */
.popular-container {
  padding: 1rem 0 1rem;
  direction: rtl;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 10px;
}

/* .popular-card {
    background-color: var(--container-color);
    border-radius: 1rem;
    transition: .4s;
    direction: rtl;
    box-shadow: 0px 0px 8px #444343;
    width: 100%;
    height: fit-content;
    padding: .2rem .5rem .1rem;
    margin: 5px auto;
} */
.popular-card {
  position: relative;
  box-shadow: 1px -4px 9px var(--grano-main-color),
    1px 4px 9px var(--grano-sec-color);
  border-radius: 1rem;
  margin: 10px 0;
  height: fit-content;
  text-align: center;
}

.popular-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../images/box-bg.png);
  background-size: cover;
  filter: blur(1px);
  background-repeat: no-repeat;
  z-index: -1;
  border-radius: 1rem;
}


.popular-img {
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.popular-data {
  padding: 0 1rem 0 0.5rem;
}

.popular-price {
  font-size: 0.9rem;
  color: white;
  margin-bottom: 0.25rem;
  font-family: var(--eng-font);
  background-color: var(--grano-main-color);
  width: fit-content;
  margin: 2px auto;
  border-radius: 6px;
  padding: 5px 10px;
}

.dark-theme .popular-price {
  color: white;
}

.popular-price span {
  color: white;
  font-family: var(--font-family);
}

.popular-title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.75rem;
  color: var(--grano-main-color);
  background-color: var(--grano-sec-color);
  padding: 5px 30px;
  border-radius: 4px;
  width: fit-content;
  margin: 0 auto;
}



.popular-description {
  font-size: var(--small-font-size);
  color: white;
  background-color: var(--grano-main-color);
  padding: 5px 5px;
  border-radius: 5px;
  margin: 4px auto;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 0.6rem;
  border-radius: 0.5rem;
  background-color: hsl(228, 8%, 96%);
}

::-webkit-scrollbar-thumb {
  border-radius: 0.5rem;
  background-color: hsl(228, 8%, 64%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(228, 8%, 54%);
}

/* Scroll Up Button */
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -30%;
  background-color: var(--container-color);
  box-shadow: 0 8px 12px hsla(228, 66%, 45%, 0.1);
  display: inline-flex;
  padding: 0.35rem;
  border-radius: 0.25rem;
  color: var(--title-color);
  font-size: 1.25rem;
  z-index: var(--z-tooltip);
  transition: 0.3s;
}

.show-scroll {
  bottom: 8rem;
}

/* Footer */
.footer {
  background-color: #44434308;
  padding: 70px 0 0;
  text-align: center;
  font-family: var(--font-family);
  direction: rtl;
}

.dark-theme .footer {
  background: linear-gradient(170deg, hsl(0, 0%, 22%) 0%, hsl(0, 0%, 6%) 30%);
}

.footer .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 50px;
}

.footer .box h3 {
  color: #c38154;
  font-size: 40px;
  margin: 0 0 10px;
  align-self: center;
  text-align: center;
  letter-spacing: 1px;
}

.dark-theme .footer .box h3 {
  color: white;
}

.footer .box h3 i {
  margin-left: 4px;
}

.dark-theme .footer .box h3 i {
  color: white;
}

.footer .box .social {
  display: flex;
  justify-content: center;
}

.footer .box .social li {
  margin-right: 10px;
}

.footer .box .social li a {
  justify-content: center;
  align-items: center;
  display: inline-flex;
  color: white;
  font-size: 20px;
  width: 35px;
  height: 35px;
  transition: 0.3s;
  border-radius: 12px;
}

.footer .box .social .facebook {
  color: white;
  background-color: var(--grano-main-color);
}

.footer .box .social .instagram {
  color: white;
  background-color: var(--grano-main-color);
}

.dark-theme .footer .box .social .instagram,
.dark-theme .footer .box .social .facebook {
  background-color: var(--grano-sec-color);
}

.footer .box .text {
  margin-top: 15px;
  margin-bottom: 15px;
  line-height: 1.6;
  color: #777;
}

.dark-theme .footer .box .text {
  color: white;
}

.footer .box .text i {
  color: var(--text-color);
  font-size: 20px;
}

.footer .box .line {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  margin-top: 10px;
  color: #777;
  flex-direction: column;
}

.dark-theme .footer .box .line {
  color: white;
}

.footer .box .line i {
  margin-right: 10px;
  color: var(--grano-main-color);
  font-size: 40px;
  margin-bottom: 15px;
}

.dark-theme .footer .box .line i {
  color: var(--grano-sec-color);
}

.footer .box .line .info {
  line-height: 1.7;
  font-size: 16px;
}

.footer .box .line .info span {
  display: block;
  font-family: var(--eng-font);
  direction: ltr;
}

.whatsapp-contact {
  font-family: var(--font-family) !important;
  direction: ltr;
}

.footer .copyright {
  padding: 25px 0;
  text-align: center;
  color: #777;
  margin: 20px 0 0;
  border-top: 1px solid #777;
  font-size: 16px;
  padding-bottom: 100px;
  font-family: var(--eng-font);
}

.dark-theme .footer .copyright {
  color: white;
  border-color: white;
}

.footer .copyright i {
  color: var(--grano-main-color);
  margin: 0 3px;
}

.dark-theme .footer .copyright i {
  color: var(--text-color);
}

.footer .ziad-info {
  color: #777;
  border-top: 1px solid #777;
  padding: 25px 0;
  text-align: center;
  line-height: 1.6;
  font-size: 16px;
}

.dark-theme .footer .ziad-info {
  color: white;
  border-color: white;
}

.footer .ziad-info i {
  color: var(--first-color);
  margin-left: 3px;
}

/* Scroller */
.x-scroller {
  overflow-x: scroll;
  overflow-y: hidden;
  height: 50px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
  scrollbar-width: thin;
  font-family: var(--font-family);
}

.dark-theme .x-scroller a {
  background-color: var(--body-color);
  color: white;
  border-left: 1px solid #7f7f7f4a;
  border-right: 1px solid #7f7f7f4a;
}

.x-scroller a {
  font-size: 16px;
  background-color: white;
  border-radius: 2px;
  padding: 10px 15px;
  border-left: 1px solid #7777771f;
  border-right: 1px solid #7777771f;
  color: black;
}

.header-logo {
  width: 50px;
  height: 50px;
  border-radius: 40%;
  margin-right: 5px;
  object-fit: contain;
}

/* Top Navigation (from your inline styles - should be moved here) */
.topnav {
  overflow: hidden;
  background-color: white;
  position: relative;
  width: 100%;
  margin: auto;
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topnav #myLinks {
  display: none;
  direction: rtl;
  height: calc(100vh - 200px);
  overflow-y: auto;
  background-color: var(--body-color);
}

.dark-theme .topnav .x-scroller {
  background-color: black;
}

.dark-theme .topnav .x-scroller a {
  background-color: black;
}

.dark-theme .topnav a {
  color: white;
}

.topnav a {
  color: var(--adam-flowers-main-color);
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  display: block;
  background-color: white;
}

.dark-theme .topnav a {
  background-color: var(--body-color);
}

.topnav .icon {
  color: var(--adam-flowers-main-color);
}

.topnav a.icon {
  display: block;
  position: absolute;
  right: 0;
  top: 0;
}

.active {
  background-color: #f9f9ea;
  color: var(--adam-flowers-main-color);
}

.dark-theme .active {
  background-color: black;
  color: var(--text-color);
}

.dark-theme .topnav {
  background-color: var(--body-color);
  color: white;
}

.dark-theme .topnav .icon {
  color: white;
}

/* Media Queries */
@media screen and (max-width: 350px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .section {
    padding: 3.5rem 0 1rem;
  }
  .home {
    padding-bottom: 0;
  }
}

@media screen and (max-width: 320px) {
  .nav-menu {
    padding: 1.3rem 1.5rem;
  }
  .home-img {
    width: 220px;
    height: 280px;
  }
}

@media screen and (min-width: 576px) {
  .nav-menu {
    width: 342px;
  }
}

@media screen and (min-width: 767px) {
  .home-container {
    grid-template-columns: repeat(2, 1fr);
    padding-top: 2rem;
  }
  .home-data {
    padding-bottom: 2rem;
  }
  .subscribe-container {
    padding: 3rem 13rem;
  }
}

@media screen and (min-width: 1023px) {
  .section {
    padding: 7.5rem 0 1rem;
  }
  .section-title {
    font-size: 2.25rem;
  }
  .section-subtitle {
    font-size: var(--normal-font-size);
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav-menu {
    width: initial;
    margin-left: auto;
  }
  .nav-list {
    display: flex;
    column-gap: 3rem;
  }
  .nav-link {
    color: var(--text-color-light);
  }
  .nav-link i {
    display: none;
  }
  .nav-boutton {
    display: block;
  }
  .active-link {
    background: none;
    box-shadow: none;
    color: var(--first-color);
    font-weight: var(--font-medium);
  }
  .change-theme {
    margin: 0 3rem;
    color: var(--text-color-light);
  }
  .scroll-header .nav-link,
  .scroll-header .change-theme {
    color: var(--text-color);
  }
  .scroll-header .active-link {
    color: var(--first-color);
  }
  .home-container {
    padding-top: 5rem;
    column-gap: 2rem;
  }
  .home-data {
    padding-bottom: 4rem;
  }
  .home-title {
    margin-bottom: 2rem;
  }
  .home-description {
    margin-bottom: 3rem;
  }
  .popular-container {
    padding-top: 3rem;
  }
  .popular-card {
    width: 320px;
    padding: 0.75rem 0.75rem 2rem;
  }
  .popular-data {
    padding: 0 0.25rem 0 0.75rem;
  }
  .show-scroll {
    bottom: 3rem;
    right: 3rem;
  }
}

@media screen and (min-width: 1040px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  .home-container {
    column-gap: 4rem;
  }
}

@media screen and (min-width: 2048px) {
  body {
    zoom: 1.5;
  }
}

@media screen and (min-width: 3840px) {
  body {
    zoom: 2;
  }
}
/* Search Bar Styling */
#search-bar {
  direction: rtl;
  width: 80%;
  max-width: 400px;
  padding: 10px;
  font-family: var(--font-family);
  transition: all 0.3s ease;
}

/* Dark Theme Adjustments */
.dark-theme #search-bar {
  background-color: var(--body-color);
  color: white;
  border-color: var(--grano-main-color);
}

/* Search Bar Hover & Focus */
#search-bar:focus {
  border-color: var(--grano-sec-color);
}

/* Centering the Search Bar */
.search-container {
  display: flex;
  justify-content: center;
  margin: auto;
  padding: 10px;
}
.dark-theme .search {
  background-color: var(--body-color);
}
.search {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grano-main-color);
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
  background-color: white;
  color: var(--grano-main-color);
  font-size: 16px;
}
