@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:wght@200;300;400;500;600;700;900&family=Quicksand:wght@300..700&display=swap");

* {
  font-family: "Quicksand", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --lead: #212121;
  --pink: #ffb6c1;
  --gold-finger: #f2bd12;
  --eye-ball: #fffdf7;
  --hint-yellow: #fcf1cc;
  --pure-white: #fff;
}
body {
  background: var(--eye-ball);
}

/* BASIC STYLING */

a {
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--lead);
}
.flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
li {
  list-style: none;
}
.between {
  justify-content: space-between;
}
.gap-2 {
  gap: 2rem;
}
.gap-3 {
  gap: 3rem;
}
.wrapper {
  max-width: 1400px;
  margin: auto;
  padding-inline: 1.5rem;
}
img {
  max-width: 100%;
  height: auto;
  margin: auto;
  display: block;
}
.p-top {
  padding-top: 10rem;
}
.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 4rem;
}
.mt-half {
  margin-top: 0.5rem;
}
.m-auto {
  margin: auto;
}
.mt-one-half {
  margin-top: 1.5rem;
}

/* HEADER STYLING */

.navbar {
  min-height: 14vh;
}
.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--pink);
}
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--pink);
  border-radius: 1rem;
  font-size: 1.1rem;
  color: var(--pure-white);
  box-shadow: rgba(0, 0, 0, 0.1) 0 2px 1px;
  transition: 0.3s ease-in-out;
}
.btn:hover {
  background: var(--lead);
}
.cart-icon {
  color: var(--lead);
  font-size: 1.3rem;
  position: relative;
}
.cart-icon .cart-value {
  position: absolute;
  top: 50%;
  right: -10px;
  font-size: 0.85rem;
  width: 20px;
  aspect-ratio: 1;
  border-radius: 100vw;
  background: var(--pink);
  color: var(--lead);
  text-align: center;
  line-height: 20px;
}
.desktop-action .hamburger {
  font-size: 1.5rem;
  display: none;
}
.mobile-menu {
  display: none;
}

/* SECTION STYLING */

/* HERO STYLING */

.hero-section {
  min-height: calc(100vh - 14vh);
}
.content,
.image-container,
.service-card {
  flex: 1;
  flex-basis: 300px;
}
h1 {
  font-size: 5.6vw;
  color: var(--lead);
}
h1 span {
  color: var(--pink);
}
p {
  font-size: 1.25rem;
  color: grey;
  line-height: 1.8rem;
  font-weight: 400;
}
.para {
  margin-block: 2rem;
  max-width: 550px;
}
.social-icon {
  background: var(--hint-yellow);
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 1rem;
  font-size: 1.2rem;
  text-align: center;
  line-height: 3rem;
  box-shadow: rgba(0, 0, 0, 0.1) 0 2px 1px;
  transition: 0.3s ease-in-out;
}
.social-icon:hover {
  background: var(--lead);
  color: var(--pure-white);
}

/* SECTION 1 */

h5 {
  font-size: 1.2rem;
  letter-spacing: 0.2rem;
  color: var(--pink);
  text-transform: uppercase;
}
h2 {
  font-size: 3.7rem;
  text-transform: capitalize;
  color: var(--lead);
}
h3 {
  font-size: 2rem;
  text-transform: capitalize;
  color: var(--lead);
}
.service-card h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* SECTION 2 */

.order-card {
  flex: 1;
  flex-basis: 300px;
  background: var(--pure-white);
  padding: 0 1rem 2rem 1rem;
  border: 0.1rem solid var(--pink);
  border-radius: 2rem;
  box-shadow: rgba(0, 0, 0, 0.05) 8px 8px 8px, rgba(0, 0, 0, 0.05) 8px 8px 8px;
}
.order-card img {
  width: 15rem;
  filter: drop-shadow(rgba(0, 0, 0, 0.2) 0 10px 10px);
}
h4 {
  font-size: 1.8rem;
  color: var(--lead);
}
.order-card .price {
  font-size: 1.7rem;
  color: var(--lead);
  padding: 1.3rem 0 2rem 0;
}

/* CART TAB STYLING */

.cart-tab {
  background: var(--hint-yellow);
  position: fixed;
  inset: 0 -500px 0 auto;
  width: 25rem;
  padding-block: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99;
  box-shadow: rgba(0, 0, 0, 0.1) -10px -10px 20px;
  transition: 0.3s ease-in-out;
}
.cart-tab-active {
  inset: 0 0 0 auto;
}
.cart-list {
  flex: 1;
  width: 100%;
  margin-top: 1.5rem;
  overflow: auto;
}
.cart-list::-webkit-scrollbar {
  width: 0;
}
.total-container {
  width: 100%;
  background: var(--pink);
  text-align: center;
  margin-block: 1rem;
  padding-block: 1rem;
}
.total-container h4 {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 400;
}
.btn-container .btn {
  background: var(--lead);
  transition: 0.3s ease-in-out;
}
.btn-container .btn:hover {
  background: var(--pink);
  color: var(--lead);
}
.item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  transition: all 0.5 ease-in-out;
}
.item.slide-out {
  transform: translateX(50%);
}
.item .detail {
  flex: 2;
}
.cart-list .item:nth-child(even) {
  background: var(--eye-ball);
}
.item .item-image {
  flex: 0 0 5rem;
}
.item .item-image img {
  width: 5rem;
}
.item h4 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  font-size: 1.3rem;
  color: var(--lead);
}
.item .item-total {
  font-weight: 400;
  margin-top: 0.3rem;
}
.quantity-btn {
  background: var(--lead);
  color: var(--pure-white);
  width: 1.7rem;
  aspect-ratio: 1;
  border-radius: 100vw;
  text-align: center;
  line-height: 1.7rem;
  flex: 0 0 auto;
}
.quantity-value {
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0.6rem;
}

/* SECTION 3 */

.review-container {
  width: 650px;
  max-width: 100%;
  flex: 1;
}
.swiper {
  width: 100%;
  height: 100%;
}
.profile {
  width: 4rem;
  aspect-ratio: 1;
  border-radius: 100vw;
  overflow: hidden;
}
.profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fa-star {
  color: var(--gold-finger);
}
.arrow {
  width: 2.5rem;
  aspect-ratio: 1;
  border-radius: 100vw;
  background: var(--pink);
  color: var(--lead);
  text-align: center;
  line-height: 2.5rem;
}

/* --- Checkout Modal Styling--- */

/* --- Modal layout hardening --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  /* Use dynamic viewport units to avoid iOS 100vh bugs */
  height: 100vh;
  height: 100dvh;
  /* Allow the overlay to scroll if content is taller than the screen */
  overflow: auto;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: flex-start; /* we'll center with margins on .modal */
  justify-content: center;
  padding: 0; /* we'll control spacing with .modal margin */
  z-index: 1000; /* higher than headers/navs */
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  /* Width & horizontal fit */
  width: min(800px, 92vw);
  /* Vertical sizing: keep within viewport with breathing space */
  margin: clamp(12px, 4vh, 24px) auto;
  max-height: calc(100dvh - 2 * clamp(12px, 4vh, 24px));
  display: flex;
  flex-direction: column;
  background: var(--pure-white, #fff);
  border-radius: 16px;
  box-shadow: rgba(0, 0, 0, 0.15) 0 10px 30px;
  overflow: hidden; /* clip rounded corners; scrolling happens in content */
}

/* Keep header fixed at the top inside the modal */
.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--hint-yellow, #fff7cc);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Make the middle section scrollable if needed */
.modal-content {
  overflow: auto;
  padding: 1rem 1.25rem;
  /* leave room for sticky actions on very small screens */
}

/* Keep action buttons always visible at the bottom */
.modal-actions {
  position: sticky;
  bottom: 0;
  background: var(--pure-white, #fff);
  border-top: 1px solid #eee;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  /* respect iOS safe area */
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* Inputs grid stays responsive */
#checkoutForm .form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}
.grid-span-2 {
  grid-column: span 2;
}
.order-summary {
  background: var(--eye-ball);
  border: 1px solid var(--pink);
  border-radius: 1rem;
  padding: 1rem;
}
.order-summary h4 {
  margin-bottom: 0.5rem;
}
#orderSummaryList {
  display: grid;
  gap: 0.5rem;
  max-height: 240px;
  overflow: auto;
}
#orderSummaryList li {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}
.order-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed #ddd;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

#checkoutForm .form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}
#checkoutForm label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--lead);
}
#checkoutForm input {
  border: 1px solid #ddd;
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
}
.grid-span-2 {
  grid-column: span 2;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.btn.btn-secondary {
  background: #e9e9e9;
  color: var(--lead);
}
.success-state {
  grid-column: 1 / -1;
  background: var(--hint-yellow);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

/* SECTION 4 */

.app-container {
  background: var(--hint-yellow);
  padding: 3rem 6rem;
  border-radius: 3rem;
}
.app-container .content h2 {
  font-size: 4.5rem;
}

.app-container .image-container img {
  width: 25rem;
}

/* SECTION 5 */

.input-container {
  width: 43rem;
  max-width: 100%;
  background: var(--pure-white);
  padding: 0.8rem;
  box-shadow: rgba(0, 0, 0, 0.1) 0 5px 8px;
  border-radius: 1rem;
  margin: 4rem auto 0 auto;
}
input[type="email"] {
  flex: 1;
  height: 7vh;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  padding-left: 1rem;
}
input[type="email"] {
  outline: none;
}

/* FOOTER STYLING */

.footer-container {
  margin-top: 10rem;
  padding-block: 4rem;
  background: var(--hint-yellow);
}
.footer-container .flex {
  align-items: flex-start;
}
.footer-wrapper {
  flex: 1;
  flex-basis: 150px;
}
.footer-wrapper:nth-child(1) {
  flex: 2;
  flex-basis: 300px;
}
.footer-wrapper .social-icon {
  background: var(--pure-white);
}
.footer-wrapper .social-icon:hover {
  background: var(--lead);
  color: var(--pure-white);
}
.footer-link {
  color: grey;
  font-size: 1.1rem;
  transition: 0.3s ease-in-out;
}
.footer-link:hover {
  color: var(--lead);
}

/* MEDIA QUERIES */
@media screen and (max-width: 780px) {
  /* HEADER STYLING */
  .navlist,
  .desktop-action .btn {
    display: none;
  }
  .desktop-action .hamburger {
    display: block;
  }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: absolute;
    top: 20%;
    left: -100%;
    transform: translateX(-50%);
    width: 20rem;
    padding: 2rem;
    background: var(--pure-white);
    border: 0.1rem solid var(--pink);
    border-radius: 2rem;
    box-shadow: rgba(0, 0, 0, 0.05) 8px 8px 8px, rgba(0, 0, 0, 0.05) 8px 8px 8px;
    transition: all 0.5s ease-in-out;
  }
  .mobile-menu-active {
    left: 50%;
    transform: translateX(-50%);
  }

  /* SECTIONS STYLING */

  h1 {
    font-size: 3.6rem;
  }
  .content {
    padding-top: 3rem;
  }
  .gap-2 {
    gap: 1.4rem;
  }

  .gap-4 {
    gap: 4rem;
  }

  /* SECTION 1 */

  h2 {
    font-size: 3rem;
  }

  /* SECTION 3 */
  /* CHECKOUT MODAL STYLING */

  .modal-content {
    grid-template-columns: 1fr;
  }
  .modal {
    width: min(640px, 96vw);
  }
  #checkoutForm .form-grid {
    grid-template-columns: 1fr;
  }
  .grid-span-2 {
    grid-column: auto;
  }

  /* SECTION 4 */

  .app-container {
    padding: 2.2rem;
  }
  .app-container .content h2 {
    font-size: 3.5rem;
  }
}
