:root {
  --cream: #faf3ee;
  --cream-2: #f6ebe4;
  --rose-deep: #fcfcfc;
  --rose: #3E5638;
  --rose-soft: #5A7254;
  --brown: #5a3b30;
  --gold: #c9a45c;
  --ink: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  background: var(--cream);
  display: flex;
  justify-content: center;
}

*,
*::before,
*::after {
  font-family: inherit;
}

.phone {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f5f6f2 0%, #edf1ea 50%, #eef0ea 100%);
  padding: 36px 20px 0px;
  display: flex;
  flex-direction: column;
}

/* decorative corner blooms, drawn with CSS/SVG, no external art */
.bloom {
  position: absolute;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.bloom.tl {
  top: -40px;
  left: -50px;
  width: 220px;
  transform: rotate(-15deg);
}

.bloom.br {
  bottom: -30px;
  right: -60px;
  width: 260px;
  transform: rotate(10deg);
}

.speck {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.speck.one {
  top: 40px;
  right: 24px;
  width: 90px;
  opacity: .6;
}

.speck.two {
  bottom: 220px;
  left: 0;
  width: 70px;
  opacity: .5;
}

.content {
  position: relative;
  z-index: 1;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.footer-section {
  margin-top: auto;
}

.avatar-wrap {
  width: 118px;
  height: 118px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  padding: 6px;
  position: relative;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--rose-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

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

.avatar svg {
  width: 58%;
  height: 58%;
}

.avatar-hint {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rose);
  border: 2px solid var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}

#fileInput {
  display: none;
}

h1 {
  text-align: center;
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0.5px;
}

h1 .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  background: var(--rose);
  border-radius: 50%;
  vertical-align: middle;
}

h1 .badge svg {
  width: 11px;
  height: 11px;
}

.tagline {
  text-align: center;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 26px;
  opacity: 0.85;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fffdfb;
  border: 1px solid #f0e3da;
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(150, 90, 90, 0.06);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.link-btn:active {
  transform: scale(0.98);
}

.icon-circle {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rose-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle svg {
  width: 22px;
  height: 22px;
  stroke: var(--rose-deep);
  fill: none;
}

.link-text {
  flex: 1;
  min-width: 0;
}

.link-title {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
}

.link-sub {
  font-size: 11.5px;
  color: var(--brown);
  opacity: 0.75;
  margin-top: 2px;
}

.arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3E5638;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.social-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-circle svg {
  width: 27px;
  height: 27px;
  stroke: #fff;
  fill: none;
}

.thankyou {
  text-align: center;
  font-family: 'Brush Script MT', cursive;
  font-style: italic;
  color: purple;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 14px;
}

.rule {
  width: 70%;
  margin: 0 auto;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

@media (max-width:360px) {
  h1 {
    font-size: 27px;
  }
}

/* Category Dropdown & List Styling */
.category-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.category-btn {
  cursor: pointer;
}

.category-btn .arrow {
  transition: transform 0.3s ease;
}

.category-btn.open .arrow {
  transform: rotate(90deg);
}

.category-list {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px;
  margin-top: -6px;
  margin-bottom: 6px;
  background: #fffdfb;
  border: 1px solid #f0e3da;
  border-top: none;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 14px rgba(150, 90, 90, 0.05);
  animation: fadeIn 0.3s ease;
}

.category-btn.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.category-item:hover {
  background: rgba(243, 217, 217, 0.25);
}

.category-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #e0d0c5;
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.custom-checkbox svg {
  width: 13px;
  height: 13px;
  stroke: var(--rose-deep);
  stroke-width: 2.8;
  display: none;
}

.category-item.active .custom-checkbox {
  background: var(--rose-soft);
  border-color: var(--rose);
}

.category-item.active .custom-checkbox svg {
  display: block;
}

.category-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.category-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  background: #ffffff;
  border: 1px solid #ebdcd3;
  padding: 2px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Product Modal / Sub-Sheet Styling */
.product-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(61, 36, 36, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: flex-end;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.product-modal.active {
  display: flex;
}

.product-sheet {
  background: #fffdfb;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 30px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0e3da;
}

.sheet-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.sheet-close-btn {
  background: var(--rose-soft);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--rose-deep);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #f2e5dc;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 3px 10px rgba(120, 70, 70, 0.04);
  transition: transform 0.15s ease;
}

.product-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(120, 70, 70, 0.08);
}

.product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #f8ece4;
  object-fit: cover;
  flex-shrink: 0;
}

.product-thumb-fallback {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--rose-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-deep);
  font-size: 22px;
  flex-shrink: 0;
}

.product-details {
  flex: 1;
  min-width: 0;
}

.product-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-item-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.price-old {
  text-decoration: line-through;
  color: #a08880;
  font-size: 12px;
}

.price-new {
  font-weight: 700;
  color: var(--ink);
}

.buy-product-btn {
  background: var(--rose);
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.buy-product-btn {
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.buy-product-btn:hover {
  background: var(--rose-deep);
  color: var(--rose);

  border: 2px solid var(--rose);

}

/* =========================================
   Preloader Styles
   ========================================= */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--cream);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

#preloader img {
  width: 120px;
  height: auto;
  animation: pulseLogo 1.5s infinite ease-in-out;
}

@keyframes pulseLogo {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
}