/* Global Styles */

body {
    font-family: "Onest", sans-serif;
    margin: 0;
}

ul {
    list-style: none;
}

p {
    color: #2A2A2A;
}

.hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;    
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bold-text {
    font-weight: bold;
}

/* Header Styles */

header {
    display: flex;
    position: sticky;
    height: 100px;
    padding: 0 20px;
    top: 0;
    z-index: 1000;
    background-color: white;
}

body.dark-theme header{
  background-color: #000 !important;  /* ensure it can’t be overridden */
}

header img {
    width: 200px;
}

.left-header {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 20px;
}

.right-header {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-right: 15px;
}

a {
    text-decoration: none;
    color: white;
    font-size: 15px;
}

nav a {
    color: #1E1E1E;
    font-size: 16px;
}

.nav-links li a {
    white-space: nowrap;
  }

.nav-links, .utility-links {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 40px;
    font-size: 20px;
    text-transform: lowercase;
}

.nav-links li{
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-property: transform;
  transition-property: transform;
}

.nav-links li:hover, .nav-links li:focus, .nav-links li:active {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

.nav-links li a:hover {
    color: #D9758E;
    font-weight: 600;
}

.utility-links {
    justify-content: space-between;
    min-width: 110px;
}

.utility-links li {
    height: auto;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #c7aafe;
    background-color: #e2d6f9;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgb(0 0 0 / 40%);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover,
.contact-right input[type="submit"]:hover {
    transition: background-color 0.3s ease, transform 0.3s ease;
    transform: scale(1.1);
}

/* Main Styles */

.hero {
  position: relative;
  overflow: hidden;
  background-color: #FEE3E5;
}

/* background image takes full width */
.hero-bg {
  display: block;
  width: 43vw;
}

/* content overlays the image */
.hero-content {
  position: absolute;
  top: 50%;
  right: 2%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 65%;
  height: 100%;
  justify-content: center;
}

.hero-content p {
  line-height: 1.8;
  font-size: 16px;
  margin-top: -1%;
}

.hero-btn {
  display: inline-block;
  padding: 9px 24px;
  background-color: #D9758E;
  border: 3px solid #C46880;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  text-transform: lowercase;
  box-shadow: 2px 3px 5px rgba(0,0,0,.15);
  transition: transform 0.2s ease, background-color 0.3s ease;
  font-size: 12px;
}

.hero-btn:hover {
  transform: scale(1.05);
  background-color: #c96480;
}

.hero-content button:hover {
  transform: scale(1.05);
  background-color: #c96480;
} 

.left-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.right-hero {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.right-hero p {
    text-align: center;
    width: 498px;
    margin: -15px auto 30px auto;
    line-height: 38px;
}

.right-hero > button {
    padding: 10px;
    background-color: #D9758E;
    border-radius: 15px;
    border: 4px solid #C46880;
    color: white;
    display: block;
    margin: 0 auto;
    width: 140px;
    font-weight: bolder;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 18px;
    text-transform: lowercase;
}

.promotion {
    position: relative;  
    display: flex;
    background: linear-gradient(to bottom, #E2D6F9, #893BB7, #26153C);
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
    gap: 70px;
    overflow: hidden;  
}

.promo-content {
    text-align: center;
    text-transform: lowercase;
    position: relative; 
    z-index: 3;
}

.promotion img {
    min-width: 300px;
    opacity: 0.67;
}

.promo-content h2 {
    font-weight: normal;
}

.promo-content span.bold-text {
    font-size: 80px;
    text-shadow: 2px 4px 3px rgba(0,0,0,0.3);
}

.promo-content form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.promo-content label {
    font-size: 18px;
}

.promo-image {
    position: relative; 
    z-index: 3;
}

input#luckyNumber {
    width: 60px;
    height: 1.5rem;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    text-align: center;
}

.input-group {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.promo-content button {
    background-color: #D9758E;
    border-radius: 15px;
    border: 4px solid #C46880;
    color: white;
    width: 150px;
    font-size: 16px;
    font-weight: bolder;
    cursor: pointer;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.1);
    text-transform: lowercase;
}

.input-group button a {
    color: white;
}

#result-message {
    line-height: 25px;
    font-weight: bold;
    font-size: 18px;
}

/* #region Sparkles */

.cta { 
    position: relative; 
}

.sparkle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
  
.sparkle {
  position: absolute;
  font-size: var(--size, 20px);
  color: var(--color, #fff);
  filter: drop-shadow(0 2px 6px rgba(255,255,255,.35));
  will-change: transform, opacity;
  opacity: .9;
  animation:
    float var(--dur, 1.8s) ease-in-out infinite alternate,
    twinkle calc(var(--dur, 1.8s) * 1.2) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes float   { from { transform: translateY(0)} to { transform: translateY(-8px)} }
@keyframes twinkle { 0%,100% {opacity:.65; transform: scale(1)} 50% {opacity:1; transform: scale(1.12)} }

@media (prefers-reduced-motion: reduce) {
  .sparkle { animation: none; }
}
/* #endregion */

.featured-products {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 100px;
}

.featured-products h2 {
    text-align: center;
    font-size: 64px;
    margin-bottom: 20px;
    font-weight: 900;
}

.categories {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding-left: 0;
    margin: 40px auto 80px auto;
    flex-wrap: wrap;
}

.categories button {
    min-width: 170px;
    background-color: #2BA2AF;
    border: 4px solid #268E99;
    padding: 15px;
    font-size: 20px;
    color: white;
    border-radius: 15px;
    font-weight: bolder;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.1);
    text-transform: lowercase;
}

.hiddenItem {
    display: none;
}

article {
    display: flex;
    margin: 50px auto 100px auto;
    width: 1200px;
}

.product-images {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-images > img {
    width: 100%;
    border-radius: 15px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail-images img {
    width: 49%;
    border-radius: 15px;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    font-size: 32px;
    margin: 0;
}

.product-details ul {
    gap: 0.5rem 0.25rem;
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    color: #2A2A2A;
}

.product-details hr {
    border-top: 2px solid #000;
    border-bottom-style: hidden;
    width: 100%;
}

.product-details p {
    line-height: 1.75;
}

.product-details p:first-of-type {
    font-size: 20px;
    margin: 0;
}

.product-details p:nth-of-type(2) {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.product-details h4 {
    margin-bottom: 10px;
}

.product-details button {
    margin: 15px auto;
    padding: 10px;
    background-color: #D9758E;
    border-radius: 15px;
    border: 4px solid #C46880;
    color: white;
    width: 140px;
    text-align: center;
    font-size: 16px;
    font-weight: bolder;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-transform: lowercase;
}

.divider {
    max-width: 1500px;
    margin: 0 auto;
    display: block;
}

.contact {
    display: flex;
    max-width: 1050px;
    margin: 100px auto 160px auto;
    justify-content: space-between;
    background-color: #FEE3E5;
    padding: 60px;
    border-radius: 15px;
}

.contact h2 {
    font-size: 64px;
    margin-top: 0;
}

.contact p {
    font-size: 24px;
    line-height: 45px;
}

.contact-right form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
  width: 530px;
}

.contact-right label {
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
  grid-column: span 2;
}

.contact-right input[type="text"],
.contact-right input[type="email"],
.contact-right input[type="tel"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-family: "Onest", sans-serif;
  box-sizing: border-box;
}

legend {
    margin-bottom: 5px;
    font-weight: 600;
    margin-left: -2px;
}

label.radio {
    font-weight: normal;
}

.contact-right textarea {
  grid-column: span 2;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #ccc;
  font-family: "Onest", sans-serif;
  margin-top: -20px;
  margin-bottom: -20px;
}

.contact-right fieldset {
  border: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-right input[type="submit"] {
  grid-column: span 2;
  background-color: #D9758E;
  color: white;
  padding: 10px 25px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 10px;
  border: 4px solid #C46880;
  justify-self: start;
  cursor: pointer;
  box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.1);
  margin-top: 15px;
  text-transform: lowercase;
}

input[type="radio"] {
    margin-bottom: 5px;
    margin-left: -10px;
}

/* Contact Validation */
.message {
  display: none;
  color: red;
  font-size: 14px;
  margin-top: 10px;
}

.errorInput {
  border-color: red !important;
}

.message.show {
  display: block;
}

/* Footer */
footer {
    display: flex;
    background-color: #D9758E;
    color: white;
    justify-content: space-between;
    font-size: 14px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.footer-left p {
    color: white;
    font-size: 12px;
}

.footer-left .copyright {
  font-size: 12px;
  color: white;
}

.footer-right {
  display: flex;
  gap: 60px;
  text-transform: lowercase;
}

.footer-column h4 {
  font-size: 16px;
  margin-bottom: 10px;
}

.footer-column ul {
  padding: 0;
}

.footer-column li {
  margin-bottom: 10px;
  
}

.footer-column a {
  color: white;
}

.footer-column a:hover {
    text-decoration: underline;
}

/* Dark Mode */
body.dark-theme {
    background-color: black;
    color: white;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme .featured-products p, 
body.dark-theme li,
body.dark-theme a {
    color: white !important;
}

body.dark-theme .contact,
body.dark-theme .contact h2,
body.dark-theme .contact p,
body.dark-theme .contact label,
body.dark-theme .contact legend {
  color: #000 !important;
}

img#heart-icon,
img#user-icon,
img#shopping-icon {
    height: auto;
    width: 30px;
}

body.dark-theme hr {
    border-color: white;
}

/* Media Queries */
/* Up to 540px — mobile layout */
@media (max-width: 540px) {
  .hero {
    display: flex;
    flex-direction: column-reverse;
  }

  .hero-bg {
    width: 100%;
  }

  .hero-content {
    position: relative;
    transform: none;
    width: 100%;
    padding: 45px 0 20px;
    right: 0;
  }

  .promotion {
    flex-direction: column;
    gap: 20px;
    padding: 35px 60px;
  }

  .promotion img {
    min-width: 180px;
  }

  .promo-content span.bold-text {
    font-size: 60px;
  }

  .featured-products {
    padding-top: 45px;
  }

  .featured-products h2 {
    font-size: 42px;
    padding: 0 10px;
  }

  .categories {
    margin: 40px auto 65px;
  }

  .categories button {
    font-size: 16px;
    min-width: 150px;
  }

  .contact {
    margin: 80px auto 120px;
  }

  .contact-left p {
    width: 270px;
  }
}

/* 541px–600px — small tablets and footer spacing */
@media (min-width: 541px) and (max-width: 600px) {
  .contact-left p {
    width: 360px;
  }

  footer {
    padding: 40px 130px 50px 85px;
  }

  .footer-left img {
    margin: -35px 0 0 -10px;
  }
}

/* Up to 600px — contact container width */
@media (max-width: 600px) {
  .contact {
    max-width: 60%;
  }
}

/* 601px–700px — wider mobile contact layout */
@media (min-width: 601px) and (max-width: 700px) {
  .contact {
    max-width: 70%;
  }
}

/* Up to 700px — small-screen contact and hero adjustments */
@media (max-width: 700px) {
  .hero-content img {
    width: 90%;
  }

  .hero-content p {
    margin-top: -1%;
    width: 362px;
    padding: 5px 0;
  }

  #contact-form {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .contact {
    gap: 30px;
  }

  .contact h2 {
    font-size: 34px;
  }

  .contact p {
    font-size: 15px;
    line-height: 25px;
  }

  .contact-right {
    width: 100%;
  }

  .contact-right label,
  .contact-right input[type="text"],
  .contact-right input[type="email"],
  .contact-right input[type="tel"],
  .contact-right textarea {
    font-size: 15px;
  }
}

/* 701px–740px — contact input text sizing */
@media (min-width: 701px) and (max-width: 740px) {
  .contact {
    gap: 50px;
  }

  .contact-right textarea,
  .contact-right input[type="text"],
  .contact-right input[type="email"],
  .contact-right input[type="tel"] {
    font-size: 16px;
  }
}

/* Up to 740px — footer stacks vertically */
@media (max-width: 740px) {
  footer {
    flex-direction: column;
    padding: 45px;
  }

  .footer-left img {
    width: 175px;
    margin: -35px 0 -25px -14px;
  }

  .footer-right {
    gap: 130px;
  }
}

/* 741px and above — footer spacing reset */
@media (min-width: 741px) {
  .footer-right {
    gap: 60px;
  }
}

/* 541px–720px — promotion section spacing */
@media (min-width: 541px) and (max-width: 720px) {
  .promotion {
    gap: 40px;
    padding: 40px 60px;
  }

  .promotion img {
    min-width: 200px;
  }

  .promo-content span.bold-text {
    font-size: 9vw;
  }
}

/* 701px–800px — hero text and button sizing */
@media (min-width: 701px) and (max-width: 800px) {
  .hero-content p {
    width: 338px;
  }

  .hero-btn {
    font-size: 13px;
  }
}

/* 450px–800px — featured section type scaling */
@media (min-width: 450px) and (max-width: 800px) {
  .featured-products h2 {
    font-size: 50px;
  }

  .categories {
    gap: 20px;
  }

  .categories button {
    font-size: 18px;
    min-width: 155px;
    padding: 10px;
  }
}

/* Up to 800px — product and article stacking */
@media (max-width: 800px) {
  article {
    flex-direction: column;
    margin: 50px auto 45px;
  }

  .product-images {
    align-items: center;
  }

  .thumbnail-images {
    justify-content: center;
  }

  .product-details {
    display: flex;
    flex-direction: column;
  }

  .product-details button {
    width: 95%;
  }

  .divider {
    width: 84%;
  }
}

/* 801px–900px — hero text scaling */
@media (min-width: 801px) and (max-width: 900px) {
  .hero-content p {
    width: 374px;
    font-size: 15px;
    line-height: 2;
  }

  .hero-btn {
    font-size: 14px;
  }
}

/* 901px–950px — hero text and featured spacing */
@media (min-width: 901px) and (max-width: 950px) {
  .hero-content p {
    width: 400px;
    line-height: 2.3;
    font-size: 16px;
  }

  .hero-btn {
    font-size: 15px;
  }

  .featured-products {
    padding-top: 70px;
  }

  .categories {
    width: 70%;
    margin: 35px auto 75px;
  }

  .product-details h3 {
    font-size: 28px;
  }

  .product-details p:first-of-type {
    font-size: 18px;
  }

  .product-details p:nth-of-type(2) {
    font-size: 22px;
  }
}

/* 951px–1015px — category width adjustments */
@media (min-width: 951px) and (max-width: 1015px) {
  .categories {
    width: 93%;
  }
}

/* Up to 1013px — stacked header and nav spacing */
@media (max-width: 1013px) {
  header {
    flex-direction: column;
    height: 100%;
  }

  .left-header,
  .right-header {
    flex-direction: column;
  }

  .right-header {
    margin-right: 0;
    gap: 5px;
    padding-bottom: 30px;
  }

  .left-header nav {
    margin-top: -30px;
  }

  header img {
    margin-top: -19px;
    width: 160px;
  }

  .nav-links {
    margin-top: -8px;
    padding: 0;
  }

  .utility-links {
    padding: 0;
  }
}

/* Up to 1015px — utility min-width and icon size */
@media (max-width: 1015px) {
  .utility-links {
    min-width: 97px;
  }

  img#heart-icon,
  img#user-icon,
  img#shopping-icon {
    width: 26px;
  }
}

/* 951px–1200px — hero text scaling */
@media (min-width: 951px) and (max-width: 1200px) {
  .hero-content {
    gap: 10px;
  }

  .hero-content p {
    line-height: 2.1;
    font-size: 18px;
    width: 500px;
  }

  .hero-btn {
    font-size: 16px;
  }
}

/* 801px–1200px — thumbnail image sizing */
@media (min-width: 801px) and (max-width: 1200px) {
  .thumbnail-images img {
    width: 49%;
  }
}

/* 801px and above — product main image fit */
@media (min-width: 801px) {
  .product-images > img {
    width: 100%;
  }
}

/* 1197px and above — hero image width */
@media (min-width: 1197px) {
  .hero-bg {
    width: 32vw;
  }
}

/* 1201px–1450px — hero text and button scaling */
@media (min-width: 1201px) and (max-width: 1450px) {
  .hero-content {
    gap: 5px;
  }

  .hero-content p {
    font-size: 21px;
    width: 600px;
  }

  .hero-btn {
    padding: 10px 33px;
    font-size: 18px;
  }
}

/* Up to 1227px — contact stacking and nav font size */
@media (max-width: 1227px) {
  .nav-links li a {
    font-size: 18px;
  }

  .contact {
    padding: 40px;
    flex-direction: column;
    align-items: center;
  }

  .contact-left {
    text-align: center;
  }

  .contact-left p {
    margin: 0 auto;
  }

  .contact-right form {
    gap: 30px;
  }
}

/* 701px–1227px — contact text and spacing */
@media (min-width: 701px) and (max-width: 1227px) {
  .contact h2 {
    font-size: 54px;
  }

  .contact p {
    font-size: 18px;
    line-height: 35px;
  }
}

/* 801px–1227px — contact max width */
@media (min-width: 801px) and (max-width: 1227px) {
  .contact {
    max-width: 575px;
  }
}

/* Up to 1300px — container width adjustments */
@media (max-width: 1300px) {
  .categories {
    width: 85%;
  }

  article {
    width: 85%;
  }
}

/* Up to 1319px and 1320px+ — article gap adjustments */
@media (max-width: 1319px) {
  article {
    gap: 30px;
  }
}

@media (min-width: 1320px) {
  article {
    gap: 50px;
  }
}

/* 1451px and above — large hero text and button size */
@media (min-width: 1451px) {
  .hero-content {
    gap: 6px;
  }

  .hero-content p {
    line-height: 1.9;
    font-size: 25px;
    width: 700px;
  }

  .hero-btn {
    padding: 10px 33px;
    font-size: 20px;
  }
}
