/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 4rem;

  /*========== Colors ==========*/
  /* Pink, Beige, Navy Blue, White */
  --first-color: #F8C8DC;
  /* Pastel Pink */
  --first-color-alt: #E8B4C8;
  --title-color: #1A2A40;
  /* Navy Blue */
  --text-color: #4A5568;
  /* Slate gray for text readability */
  --text-color-light: #718096;
  --body-color: #FDFBF7;
  /* Elegant Beige */
  --container-color: #FFFFFF;
  /* White */
  --border-color: #E2E8F0;

  /*========== Font and typography ==========*/
  /* .5rem = 8px | 1rem = 16px ... */
  --body-font: 'Outfit', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: .875rem;
  --smaller-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-light: 300;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
  :root {
    --h1-font-size: 4rem;
    --h2-font-size: 2.25rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: .3s;
  /* For dark mode later if needed */
}

h1,
h2,
h3,
h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input {
  border: none;
  outline: none;
  font-family: var(--body-font);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1024px;
  margin-right: 1.5rem;
  margin-left: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding: 4.5rem 0 2rem;
}

.section-title {
  font-size: var(--h2-font-size);
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
}

/* Dynamic line under section title */
.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: var(--first-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
}

/*=============== HEADER & NAV ===============*/
.header {
  width: 100%;
  background: rgba(253, 251, 247, 0.85);
  /* Frosty beige */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  transition: .4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: var(--title-color);
  font-weight: var(--font-bold);
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.logo span {
  color: var(--first-color);
}

.navbar {
  display: flex;
  column-gap: 2rem;
}

.nav-link {
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: .3s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--first-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: var(--first-color);
  bottom: -4px;
  left: 0;
  transition: .3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-icons {
  display: flex;
  align-items: center;
  column-gap: 1.25rem;
}

.cart-icon,
.menu-icon {
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
  transition: .3s;
  position: relative;
}

.cart-icon:hover {
  color: var(--first-color);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--first-color);
  color: var(--title-color);
  font-size: .75rem;
  font-weight: var(--font-bold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-icon {
  display: none;
  /* Hide on large screens */
}

/*=============== HERO ===============*/
.hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-data {
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  display: block;
  font-size: var(--h3-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
  margin-bottom: .5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-title {
  font-size: var(--h1-font-size);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-description {
  margin-bottom: 2.5rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  background-color: var(--title-color);
  /* Navy blue button */
  color: var(--container-color);
  padding: 1rem 2rem;
  border-radius: 3rem;
  font-weight: var(--font-medium);
  transition: .3s;
  cursor: pointer;
}

.button:hover {
  background-color: var(--first-color);
  color: var(--title-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(248, 200, 220, 0.4);
}

.hero-image {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(26, 42, 64, 0.1);
  transform: rotate(-3deg);
  transition: transform 0.5s ease;
}

.hero-image:hover {
  transform: rotate(0deg);
}

.hero-image img {
  width: 100%;
  display: block;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(26, 42, 64, 0) 50%, rgba(26, 42, 64, 0.3) 100%);
}

/*=============== CATEGORIES ===============*/
.categories-container {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background-color: var(--container-color);
  padding: 2rem 1rem;
  border-radius: 1.5rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--first-color);
}

.category-icon {
  width: 60px;
  height: 60px;
  background-color: var(--body-color);
  color: var(--title-color);
  font-size: 2rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  margin-bottom: 1rem;
  transition: .3s;
}

.category-card:hover .category-icon {
  background-color: var(--first-color);
  color: var(--title-color);
}

.category-title {
  font-size: var(--normal-font-size);
  margin-bottom: .25rem;
}

.category-subtitle {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

/*=============== PRODUCTS ===============*/
.products-filters {
  display: flex;
  justify-content: center;
  column-gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-item {
  cursor: pointer;
  font-weight: var(--font-medium);
  color: var(--title-color);
  padding: .5rem 1.5rem;
  border-radius: 2rem;
  background-color: transparent;
  transition: .3s;
  border: 1px solid var(--border-color);
}

.filter-item:hover {
  border-color: var(--first-color);
}

.filter-item.active {
  background-color: var(--first-color);
  border-color: var(--first-color);
  color: var(--title-color);
}

.products-container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--container-color);
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: .3s;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Ensure cards stretch uniformly */
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .5s;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* Enforce exact square uniform size */
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.product-title {
  font-size: var(--h3-font-size);
  margin-bottom: .25rem;
  flex-grow: 1;
  /* Pushes price/button down if title wraps */
}

.product-category {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  margin-bottom: 1rem;
  display: block;
}

.product-price {
  font-size: var(--h3-font-size);
  color: var(--first-color);
  font-weight: var(--font-bold);
}

.product-button {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background-color: var(--title-color);
  color: var(--container-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: .3s;
}

.product-button:hover {
  background-color: var(--first-color);
  color: var(--title-color);
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--container-color);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-container {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-description {
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  column-gap: 1rem;
}

.footer-social-link {
  display: inline-flex;
  background-color: var(--body-color);
  color: var(--title-color);
  font-size: 1.25rem;
  padding: .5rem;
  border-radius: 50%;
  transition: .3s;
}

.footer-social-link:hover {
  background-color: var(--first-color);
  color: var(--title-color);
  transform: translateY(-3px);
}

.footer-title {
  font-size: var(--h3-font-size);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  row-gap: .75rem;
}

.footer-link {
  color: var(--text-color);
  transition: .3s;
}

.footer-link:hover {
  color: var(--first-color);
  padding-left: .25rem;
}

.footer-links li {
  display: flex;
  align-items: center;
  column-gap: .5rem;
}

.footer-links i {
  color: var(--first-color);
  font-size: 1.25rem;
}

.footer-copy {
  text-align: center;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

/*=============== CART SIDEBAR ===============*/
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 42, 64, 0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: .3s;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: var(--container-color);
  z-index: calc(var(--z-modal) + 1);
  padding: 2rem;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Active cart classes */
.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-close {
  font-size: 2rem;
  color: var(--title-color);
  cursor: pointer;
  transition: .3s;
}

.cart-close:hover {
  color: var(--first-color);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
}

.empty-cart {
  text-align: center;
  color: var(--text-color-light);
  margin-top: 2rem;
  font-size: 1.125rem;
}

.cart-item {
  display: flex;
  align-items: center;
  column-gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-img {
  width: 70px;
  height: 70px;
  border-radius: .5rem;
  object-fit: cover;
}

.cart-details {
  flex-grow: 1;
}

.cart-title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  margin-bottom: .25rem;
}

.cart-price {
  font-size: var(--small-font-size);
  color: var(--first-color);
  font-weight: var(--font-bold);
  margin-bottom: .25rem;
}

.cart-quantity {
  display: flex;
  align-items: center;
  column-gap: .5rem;
}

.qty-btn {
  background-color: var(--body-color);
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
  transition: .3s;
}

.qty-btn:hover {
  background-color: var(--first-color);
  color: var(--title-color);
}

.cart-remove {
  font-size: 1.5rem;
  color: red;
  cursor: pointer;
  transition: .3s;
}

.cart-remove:hover {
  color: darkred;
}

.cart-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  color: var(--title-color);
  margin-bottom: 1.5rem;
}

.checkout-btn {
  width: 100%;
  justify-content: center;
  background-color: #25D366;
  /* WhatsApp Green */
  font-size: 1.125rem;
}

.checkout-btn:hover {
  background-color: #128C7E;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.checkout-note {
  text-align: center;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  margin-top: 1rem;
}

/*=============== NOTIFICATION TOAST ===============*/
.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--title-color);
  color: var(--container-color);
  padding: 1rem 2rem;
  border-radius: 3rem;
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  z-index: var(--z-fixed);
  box-shadow: 0 8px 24px rgba(26, 42, 64, 0.2);
  transition: bottom 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast.show {
  bottom: 2rem;
}

/*=============== MEDIA QUERIES ===============*/
/* Large devices */
@media screen and (min-width: 1024px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Medium devices */
@media screen and (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-data {
    order: -1;
  }

  .hero-image {
    width: 80%;
    margin: 0 auto;
  }

  .navbar {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--container-color);
    padding: 2rem;
    flex-direction: column;
    row-gap: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
  }

  .navbar.show-menu {
    display: flex;
  }

  .menu-icon {
    display: block;
  }

  /* E-commerce Mobile Optimizations */
  .section {
    padding: 3.5rem 0 1.5rem;
  }

  .products-container {
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns on mobile */
    gap: 1rem;
  }

  .product-card {
    padding: 0.75rem;
    border-radius: 1rem;
  }

  .product-img-wrapper {
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
  }

  .product-title {
    font-size: var(--normal-font-size);
  }

  .product-price {
    font-size: var(--normal-font-size);
  }

  .product-button {
    width: 35px;
    height: 35px;
    font-size: 1.15rem;
    bottom: 0.75rem;
    right: 0.75rem;
  }

  .categories-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .category-card {
    padding: 1.5rem 0.5rem;
    border-radius: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }
}

/* Small devices */
@media screen and (max-width: 350px) {
  .hero-title {
    font-size: 2rem;
  }

  .cart-sidebar {
    padding: 1rem;
  }

  .products-container {
    grid-template-columns: 1fr;
    /* 1 column on very small phones */
  }

  .categories-container {
    grid-template-columns: 1fr;
  }
}