@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* =========================
   GLOBAL
========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  background: linear-gradient(135deg,
      #c9cfcf,
      #eac2a8);

  font-family: "Poppins", sans-serif;

  overflow-x: hidden;
  overflow-y: auto;

  padding:
    18px 18px calc(120px + env(safe-area-inset-bottom));

  display: flex;
  flex-direction: column;
}

/* =========================
   PAGE CONTAINER
========================== */

.page-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================
   HEADER
========================== */

/* =========================
   BACK BUTTON
========================== */

.page-back-btn {
  width: 48px;
  height: 48px;

  border: none;
  outline: none;

  border-radius: 50%;

  background: #ffffff;

  color: #111111;

  font-size: 1.05rem;

  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  flex-shrink: 0;

  margin-right: 14px;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.10);

  transition: 0.3s ease;
}

.page-back-btn:hover {
  transform: translateY(-2px);
}

.page-back-btn:active {
  transform: scale(0.95);
}

.top-header {
  width: 100%;

  display: flex;
  align-items: center;

  margin-bottom: 24px;

  animation: fadeTop 0.8s ease;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* LOGO */

.brand-logo {
  width: 80px;
  height: 80px;

  object-fit: contain;

  display: block;

  flex-shrink: 0;
}

/* BRAND NAME */

.brand-section h1 {
  font-family: "Montserrat", serif;

  font-size: 1.6rem;
  font-weight: 700;

  color: #000000;

  letter-spacing: 1px;

  line-height: 1;

  text-transform: uppercase;

  text-shadow:
    0 3px 10px rgba(0, 0, 0, 0.10);
}

/* =========================
   CATEGORY SECTION
========================== */

.category-section {
  width: 100%;
}

.category-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 16px;
}

/* TABLET */

@media (min-width:768px) {

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* DESKTOP */

@media (min-width:1024px) {

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* LARGE DESKTOP */

@media (min-width:1400px) {

  .category-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* =========================
   CATEGORY CARD
========================== */

.category-card {
  background: #ffffff;

  border-radius: 24px;

  padding: 7px;

  overflow: hidden;

  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.06);

  animation: cardFade 0.8s ease forwards;

  opacity: 0;
  transform: translateY(40px);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.category-card:hover {
  transform: translateY(-4px);

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.10);
}

/* IMAGE */

.category-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
  margin-bottom: 4px;
  display: block;
  background-color: #f0bfa3;
}

/* TITLE */

.category-card h3 {
  font-family: "Playfair Display", serif;

  font-size: 1rem;
  font-weight: 700;

  color: #1f1f1f;

  text-align: center;

  padding: 4px 0 6px;
}

/* =========================
   BOTTOM NAVIGATION
========================== */

.bottom-nav {
  position: fixed;

  bottom: calc(15px + env(safe-area-inset-bottom));

  left: 50%;
  transform: translateX(-50%);

  width: min(92vw, 420px);
  height: 78px;

  background: rgba(182, 181, 181, 0.92);

  border-radius: 28px;

  display: flex;
  justify-content: space-around;
  align-items: center;

  padding: 0 10px;

  backdrop-filter: blur(12px);

  z-index: 9999;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.15);
}

.nav-item {
  position: relative;

  width: 68px;
  height: 68px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-link {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  gap: 5px;

  text-decoration: none;
  color: #ffffff;

  transition: 0.35s ease;
}

.nav-link i {
  font-size: 1.2rem;
  transition: 0.35s ease;
}

.nav-text {
  position: absolute;

  bottom: -10px;

  font-size: 0.7rem;

  opacity: 0;

  transform: translateY(10px);

  transition: 0.35s ease;

  color: #000000;
}

.nav-item.active .nav-link i {
  transform: translateY(-10px);

  color: #9c5015;

  text-shadow:
    0 0 10px rgb(253, 210, 196),
    0 0 25px rgba(255, 187, 164, 1);
}

.nav-item.active .nav-text {
  opacity: 1;
  transform: translateY(0);

  font-weight: 600;
}

/* =========================
   ANIMATIONS
========================== */

@keyframes cardFade {

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeTop {

  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   MOBILE
========================== */

@media (max-width:480px) {

  body {
    padding:
      14px 12px calc(120px + env(safe-area-inset-bottom));
  }

  .brand-section {
    gap: 10px;
  }

  .category-grid {
    gap: 12px;
  }

  .category-card {
    padding: 6px;
    border-radius: 20px;
  }

  .category-card h3 {
    font-size: 0.9rem;
  }

  .nav-text {
    font-size: 0.62rem;
  }
}

/* =========================
   PRODUCT POPUP
========================== */

.product-popup {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 18px;

  opacity: 0;
  visibility: hidden;

  transition: 0.35s ease;
}

.product-popup.show {
  opacity: 1;
  visibility: visible;
}

.popup-overlay {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(4px);
}

.popup-container {
  position: relative;

  width: 100%;
  max-width: 420px;

  max-height: 90vh;

  overflow-y: auto;

  border-radius: 36px;

  animation: popupFade 0.35s ease;

  z-index: 2;
}

/* =========================
   IMAGE CARD
========================== */

.popup-image-card {
  position: relative;

  border-radius: 36px;

  padding: 7px;

  margin-bottom: 14px;

  overflow: hidden;
  background: #ffffff;

}

.popup-image-card img {
  width: 100%;
  height: 350px;

  object-fit: cover;
  border-radius: 35px;

  display: block;
  background: #f0bfa3;
}

/* CLOSE BUTTON */

.popup-close {
  position: absolute;

  top: 18px;
  right: 18px;

  width: 48px;
  height: 48px;

  border: none;
  outline: none;

  border-radius: 50%;

  background: #ffffff;

  color: #111111;

  font-size: 1.1rem;

  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.10);
}

/* =========================
   DETAILS CARD
========================== */

.popup-details-card {
  background: #ffffff;

  border-radius: 36px;

  padding: 24px;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.08);
}

.popup-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 16px;

  margin-bottom: 16px;
}

.popup-top-row h2 {
  font-size: 1.4rem;
  font-weight: 600;

  color: #1f1f1f;

  line-height: 1.4;
}

/* =========================
   QUANTITY
========================== */

.quantity-box {
  display: flex;
  align-items: center;

  background: #f3f3f3;

  border-radius: 40px;

  padding: 4px;

  gap: 12px;

  flex-shrink: 0;
}

.qty-btn {
  width: 34px;
  height: 34px;

  border: none;

  border-radius: 50%;

  background: #ffffff;

  font-size: 1.2rem;

  cursor: pointer;
}

.qty-btn.active {
  background: #db7b31;
}

#quantityValue {
  min-width: 18px;

  text-align: center;

  font-weight: 600;
}

/* =========================
   PRICE
========================== */

.popup-price {
  font-size: 1.4rem;
  font-weight: 700;

  color: #111111;

  margin-bottom: 20px;
}

/* =========================
   SIZE
========================== */

.size-title {
  font-size: 1rem;
  font-weight: 600;

  margin-bottom: 14px;

  color: #222222;
}

.size-options {
  display: flex;
  flex-wrap: wrap;

  gap: 12px;

  margin-bottom: 28px;
}

.size-option {
  min-width: 82px;

  padding: 12px 16px;

  border-radius: 999px;

  background: #f5f5f5;

  border: 2px solid transparent;

  font-size: 0.9rem;
  font-weight: 500;

  cursor: pointer;

  transition: 0.3s ease;

  text-align: center;
}

.size-option.active {
  background: #db7b31;
  border-color: #f8deae;
}

/* =========================
   BUTTONS
========================== */

.popup-buttons {
  display: flex;

  gap: 14px;
}

.cart-btn,
.buy-btn {
  flex: 1;

  height: 56px;

  border: none;
  outline: none;

  border-radius: 999px;

  font-size: 1rem;
  font-weight: 600;

  cursor: pointer;

  transition: 0.3s ease;
}

.cart-btn {
  background: #f1f1f1;
  color: #111111;
}

.buy-btn {
  background: #db7b31;
  color: #111111;
}

.cart-btn:hover,
.buy-btn:hover {
  transform: translateY(-2px);
}

/* =========================
   POPUP ANIMATION
========================== */

@keyframes popupFade {

  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   MOBILE
========================== */

@media (max-width:480px) {

  .popup-container {
    max-width: 100%;
  }

  .popup-image-card {
    padding: 10px;
    border-radius: 28px;
    height: 300px;
  }

  .popup-image-card img {
    height: 280px;
    border-radius: 30px;
  }

  .popup-details-card {
    padding: 20px;
    border-radius: 28px;
  }

  .popup-top-row h2 {
    font-size: 1.1rem;
  }

  .popup-buttons {
    gap: 10px;
  }

  .cart-btn,
  .buy-btn {
    height: 50px;
    font-size: 0.92rem;
  }

}

/* =========================
   CART TOAST
========================== */

.cart-toast {
  position: fixed;

  top: 24px;
  right: 24px;

  min-width: 320px;
  max-width: 90vw;

  background: #ffffff;

  border-radius: 24px;

  padding: 16px;

  display: flex;
  align-items: center;
  gap: 14px;

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.18);

  z-index: 99999;

  opacity: 0;
  visibility: hidden;

  transform:
    translateX(120px) scale(0.9);

  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s ease;
}

/* SHOW */

.cart-toast.show {
  opacity: 1;
  visibility: visible;

  transform:
    translateX(0) scale(1);
}

/* ICON */

.toast-icon {
  width: 52px;
  height: 52px;

  border-radius: 18px;

  background:
    linear-gradient(135deg,
      #9c5015,
      #db7b31);

  display: flex;
  justify-content: center;
  align-items: center;

  flex-shrink: 0;

  animation: toastPulse 1.2s infinite;
}

.toast-icon i {
  color: #ffffff;
  font-size: 1.2rem;
}

/* CONTENT */

.toast-content {
  flex: 1;
}

.toast-content h4 {
  font-size: 1rem;
  font-weight: 700;

  color: #111111;

  margin-bottom: 3px;
}

.toast-content p {
  font-size: 0.9rem;
  color: #666666;
}

/* =========================
   POPUP TITLE
========================== */

#popupTitle {
  display: flex;
  align-items: center;
  gap: 6px;

  flex-wrap: nowrap;

  font-size: 1.2rem;
  font-weight: 700;

  line-height: 1.2;

  text-transform: capitalize;
}

/* ANIMATION */

@keyframes toastPulse {

  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* MOBILE */

@media (max-width:480px) {

  .cart-toast {
    top: 16px;
    right: 12px;
    left: 12px;

    min-width: auto;

    padding: 14px;

    border-radius: 20px;
  }

  .toast-icon {
    width: 46px;
    height: 46px;

    border-radius: 15px;
  }

  .toast-content h4 {
    font-size: 0.92rem;
  }

  .toast-content p {
    font-size: 0.82rem;
  }

}