/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-purple: #52437e;
  --dark-purple: #3d2f5e;
  --deep-purple: #2a1f45;
  --pink-accent: #bc3e6f;
  --pink-light: #e91e8c;
  --pink-glow: rgba(233, 30, 140, 0.35);
  --text-purple: #6b4b8a;
  --text-gray: #666;
  --text-dark: #2d2d3f;
  --bg-light: #f4f1f9;
  --bg-page: #ede8f5;
  --white: #ffffff;
  --border-color: rgba(107, 75, 138, 0.15);
  --shadow-sm: 0 2px 8px rgba(82, 67, 126, 0.08);
  --shadow-md: 0 8px 24px rgba(82, 67, 126, 0.12);
  --shadow-lg: 0 16px 48px rgba(82, 67, 126, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.45);
  --card-radius: 16px;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Fredoka', sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



/* ========== Animations ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}





@keyframes spin {
  to { transform: rotate(360deg); }
}



/* ========== Header – Floating Rounded Navbar ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 20px;
  background: transparent;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, #6b4f9e 0%, #52437e 40%, #3d2f5e 100%);
  border-radius: 60px;
  padding: 10px 20px;
  box-shadow:
    0 8px 32px rgba(42, 31, 69, 0.30),
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

/* Rainbow accent line under navbar */
.header-container::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 40px;
  right: 40px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #f9d423 0%,
    #ff4e50 30%,
    #e91e8c 60%,
    #bc3e6f 100%);
  opacity: 0.8;
}

/* Circular icon buttons (left & right) */
.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.3s var(--transition-smooth);
  border: 3px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 0 transparent;
}

.header-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.header-icon:hover {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(233, 30, 140, 0.3);
}

/* Left icon – purple glow accent */
.header-icon-left {
  border-color: rgba(249, 212, 35, 0.4);
}

.header-icon-left:hover {
  border-color: rgba(249, 212, 35, 0.7);
  box-shadow: 0 0 20px rgba(249, 212, 35, 0.3);
}

/* Right avatar – pink glow + online indicator */
.header-icon-right {
  position: relative;
  border-color: rgba(233, 30, 140, 0.4);
}

.header-icon-right:hover {
  border-color: rgba(233, 30, 140, 0.7);
  box-shadow: 0 0 20px rgba(233, 30, 140, 0.35);
}

.header-icon-right::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2.5px solid #3d2f5e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Center logo */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 16px;
  transition: transform 0.3s var(--transition-smooth);
}

.logo:hover {
  transform: scale(1.04);
}

.logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* ========== Main Content ========== */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* ========== Filter Bar ========== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.search-container {
  flex: 1;
  /* max-width: 300px; */
  position: relative;
}

.search-container::before {
  content: '🔍';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 13px 20px 13px 44px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  background: var(--white);
  transition: all 0.3s var(--transition-smooth);
  color: var(--text-dark);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(82, 67, 126, 0.1);
  background: var(--white);
}

.search-input::placeholder {
  color: #b0a8c0;
}

.tabs {
  display: flex;
  background: linear-gradient(135deg, #f9d423 0%, #ff4e50 50%, #bc3e6f 100%);
  border-radius: 50px;
  overflow: hidden;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(249, 212, 35, 0.2);
}

.tab {
  padding: 11px 28px;
  border: none;
  background: transparent;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.35s var(--transition-smooth);
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.tab:hover {
  background: rgba(255, 255, 255, 0.25);
}

.tab.active {
  background: var(--white);
  color: var(--pink-accent);
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sort-container {
  margin-left: auto;
}

.sort-select {
  padding: 13px 40px 13px 18px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: var(--white);
  cursor: pointer;
  appearance: none;
  color: var(--text-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b4b8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  transition: all 0.3s var(--transition-smooth);
}

.sort-select:hover {
  border-color: rgba(107, 75, 138, 0.3);
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(82, 67, 126, 0.1);
}

/* ========== Content Area ========== */
.content-area {
  display: flex;
  gap: 30px;
}

/* ========== Products ========== */
.products-container {
  flex: 1;
}

.results-info {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-purple);
  opacity: 0.8;
  padding-left: 4px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* Product Card */
.product-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--transition-smooth);
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(107, 75, 138, 0.06);
  animation: cardEntrance 0.5s var(--transition-smooth) both;
  overflow: hidden;
}

/* Gradient glow border on hover */
.product-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--card-radius);
  padding: 2px;
  background: linear-gradient(135deg, #f9d423, #ff4e50, #e91e8c, #52437e);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--transition-smooth);
  pointer-events: none;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(233, 30, 140, 0.08);
}

.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-light);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.45s var(--transition-smooth);
  background: var(--bg-light);
}

.product-card:hover .product-image.primary {
  opacity: 0;
  transform: scale(1.05);
}

.product-image.secondary {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}

.product-card:hover .product-image.secondary {
  opacity: 1;
  transform: scale(1.02);
}

.new-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 48px; height: 48px;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(233, 30, 140, 0.3));
}

.secondary-thumbnail {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 46px; height: 46px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--white);
  transition: transform 0.3s var(--transition-smooth);
}

.product-card:hover .secondary-thumbnail {
  transform: scale(1.1);
}

.secondary-thumbnail img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: var(--white);
}

.product-info {
  text-align: center;
  padding-top: 2px;
}

.product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-purple);
  margin-bottom: 3px;
  text-transform: uppercase;
  line-height: 1.3;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-purple);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== Pet Card Specifics ========== */
.pet-card .product-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
}

.pet-card .product-image {
  width: 100%;
  height: 100%;
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
}

.pet-card:hover .product-image.primary {
  opacity: 1;
  transform: scale(1.08);
}

.pet-card .product-category {
  opacity: 1;
  font-weight: 700;
  font-size: 11px;
}

.tier-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 50px;
  font-family: 'Fredoka', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ========== SEO Content Block ========== */
.seo-content-block {
  padding: 60px 20px;
  background: linear-gradient(180deg, var(--bg-page) 0%, rgba(200, 185, 230, 0.4) 100%);
  margin-top: 40px;
  border-top: 2px dashed rgba(107, 75, 138, 0.15);
  border-radius: 20px;
}

.seo-container {
  max-width: 900px;
  margin: 0 auto;
}

.seo-heading {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  color: var(--deep-purple);
  margin-bottom: 40px;
  position: relative;
}

.seo-heading::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-purple), var(--pink-accent));
  border-radius: 4px;
}

.seo-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.seo-step {
  background: var(--white);
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(42, 31, 69, 0.05);
  border: 1px solid rgba(107, 75, 138, 0.1);
  position: relative;
  transition: transform 0.3s var(--transition-smooth);
}

.seo-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(42, 31, 69, 0.1);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--pink-accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 16px;
  box-shadow: 0 4px 12px var(--pink-glow);
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-purple);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.6;
}

/* FAQ Section */
.seo-faq {
  background: var(--white);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(42, 31, 69, 0.05);
  border: 1px solid rgba(107, 75, 138, 0.1);
}

.faq-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(107, 75, 138, 0.1);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-question {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-purple);
  margin-bottom: 8px;
  position: relative;
  padding-left: 24px;
}

.faq-question::before {
  content: 'Q:';
  position: absolute;
  left: 0;
  color: var(--pink-accent);
}

.faq-answer {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.6;
  padding-left: 24px;
}

/* ========== Footer ========== */
.footer {
  background: linear-gradient(180deg,
    var(--bg-page) 0%,
    #ddd4ef 20%,
    #c4b5de 45%,
    var(--primary-purple) 75%,
    var(--deep-purple) 100%);
  padding: 80px 20px 30px;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

/* Floating sparkle dots in footer */
.footer::before,
.footer::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
}

.footer::before {
  width: 200px; height: 200px;
  bottom: 40px; left: 15%;
  background: radial-gradient(circle, rgba(233, 30, 140, 0.25), transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.footer::after {
  width: 150px; height: 150px;
  bottom: 80px; right: 20%;
  background: radial-gradient(circle, rgba(249, 212, 35, 0.2), transparent 70%);
  animation: float 8s ease-in-out infinite 2s;
}

.footer-character {
  position: absolute;
  bottom: 60px;
  z-index: 1;
}

.footer-character.left {
  left: 24px;
}

.footer-character.right {
  right: 24px;
}

.footer-mascot {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(42, 31, 69, 0.3));
}

.footer-mascot.penguin {
  width: 200px;
}

.footer-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.social-link {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-purple);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  transition: all 0.35s var(--transition-smooth);
  text-decoration: none;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(82, 67, 126, 0.1);
}

.social-link:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--pink-light), var(--pink-accent));
  border-color: transparent;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 24px var(--pink-glow);
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-links span {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 10px;
}

.copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 30px;
  letter-spacing: 0.3px;
}

.footer-banner {
  max-width: 300px;
  margin: 0 auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.footer-banner:hover {
  opacity: 1;
}

.banner-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.2));
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .footer-mascot {
    width: 100px;
  }

  .footer-mascot.penguin {
    width: 130px;
  }
}

@media (max-width: 992px) {
  .header-icon {
    width: 46px;
    height: 46px;
  }

  .logo-img {
    height: 46px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .footer-character {
    display: none;
  }
}

@media (max-width: 768px) {
  .logo-img {
    height: 40px;
  }

  .header-icon {
    width: 42px;
    height: 42px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .search-container {
    max-width: none;
  }

  .tabs {
    width: 100%;
    justify-content: center;
  }

  .sort-container {
    margin-left: 0;
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 8px 10px;
  }

  .header-container {
    padding: 8px 14px;
  }

  .logo-img {
    height: 32px;
  }

  .header-icon {
    width: 36px;
    height: 36px;
    border-width: 2px;
  }

  .header-icon-right::after {
    width: 10px;
    height: 10px;
    border-width: 2px;
  }

  .product-card {
    padding: 10px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-category {
    font-size: 10px;
  }

  .new-badge {
    width: 32px; height: 32px;
  }

  .secondary-thumbnail {
    width: 32px; height: 32px;
  }

  .filter-bar {
    border-radius: 12px;
  }
}

/* ========== Loading Animation ========== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.loading-spinner {
  width: 50px; height: 50px;
  border: 4px solid var(--bg-light);
  border-top-color: var(--pink-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-purple);
  font-size: 17px;
  font-weight: 500;
  opacity: 0.7;
}

/* ========== Checkout Modal ========== */
.checkout-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s var(--transition-smooth);
}

.checkout-modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(20, 10, 40, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  animation: modalSlideIn 0.35s var(--transition-smooth);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-gray);
  transition: all 0.3s var(--transition-smooth);
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--pink-accent);
  color: var(--white);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 20px var(--pink-glow);
}

.modal-close.hidden {
  display: none !important;
}

.modal-product-card {
  background: var(--white);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 24px 64px rgba(42, 31, 69, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-product-card .product-image-container {
  max-width: 140px;
  margin: 0 auto 10px;
  background: transparent;
}

.modal-product-card .product-image {
  max-height: 140px;
  object-fit: contain;
}

.modal-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(107, 75, 138, 0.2) 20%, rgba(107, 75, 138, 0.2) 80%, transparent 100%);
  margin: 24px 0;
}

.modal-form {
  width: 100%;
}

.modal-form .form-group {
  margin-bottom: 20px;
}

.modal-form .form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-purple);
  margin-bottom: 10px;
  text-align: center;
}

.modal-form .required {
  color: var(--pink-accent);
}

.modal-form .form-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  color: var(--text-purple);
  background: var(--bg-light);
  transition: all 0.3s var(--transition-smooth);
  text-align: center;
}

.modal-form .form-input:focus {
  outline: none;
  border-color: var(--primary-purple);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(82, 67, 126, 0.1);
}

.modal-form .form-input::placeholder {
  color: #b0a8c0;
}

.modal-form .form-actions {
  margin-top: 20px;
}

.modal-form .continue-button {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(180deg, #e91e8c 0%, #bc3e6f 100%);
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 0 #8a2a4d, 0 6px 20px var(--pink-glow);
  position: relative;
  overflow: hidden;
}

.modal-form .continue-button::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}

.modal-form .continue-button:hover::after {
  left: 100%;
}

.modal-form .continue-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #8a2a4d, 0 10px 30px var(--pink-glow);
}

.modal-form .continue-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 #8a2a4d;
}

.modal-user-result {
  margin-top: 20px;
}

.modal-user-result.hidden {
  display: none;
}

.result-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.result-item {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  transition: all 0.3s var(--transition-smooth);
}

.result-item:hover {
  border-color: rgba(107, 75, 138, 0.3);
  box-shadow: var(--shadow-sm);
}

.result-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-image {
  width: 88px; height: 88px;
  object-fit: contain;
  background: var(--white);
  border-radius: 12px;
  margin: 0 auto 10px;
  border: 1px solid var(--border-color);
}

.result-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-purple);
  word-break: break-word;
}

.modal-user-result .confirm-button {
  width: 100%;
  padding: 16px 32px;
  border: none;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink-accent), var(--primary-purple));
  box-shadow: 0 4px 0 #3e3261, 0 8px 24px rgba(82, 67, 126, 0.3);
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.modal-user-result .confirm-button::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s;
}

.modal-user-result .confirm-button:hover::after {
  left: 100%;
}

.modal-user-result .confirm-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #3e3261, 0 12px 30px rgba(82, 67, 126, 0.35);
  filter: brightness(1.05);
}

.modal-user-result .confirm-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 #3e3261, 0 6px 14px rgba(82, 67, 126, 0.25);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .modal-content {
    max-width: calc(100% - 1px);
  }

  .modal-close {
    top: -10px; right: -10px;
    width: 36px; height: 36px;
    font-size: 18px;
  }

  .modal-product-card {
    padding: 10px;
    border-radius: 16px;
  }

  .modal-divider {
    margin: 18px 0;
  }

  .modal-form .form-input {
    padding: 12px 16px;
    font-size: 14px;
  }

  .modal-form .continue-button {
    padding: 14px 24px;
    font-size: 14px;
  }

  .modal-user-result .confirm-button {
    padding: 14px 24px;
    font-size: 14px;
  }

  .result-image {
    width: 72px; height: 72px;
  }
}

/* ========== Loading State ========== */
.modal-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
  text-align: center;
}

.modal-loading-state.hidden {
  display: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--pink-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-purple);
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.animate-text {
  animation: slideFadeUp 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideFadeUp {
  0% { 
    opacity: 0; 
    transform: translateY(12px); 
    filter: blur(4px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(-12px); 
    filter: blur(0px); 
  }
}

/* ========== Ultra-Premium Offers State ========== */
.modal-offers-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  animation: slideFadeUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-offers-state.hidden {
  display: none;
}

.offers-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #f9d423, #ff4e50, #e91e8c, #bc3e6f);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.5px;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.offers-subtitle {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 24px;
  text-align: center;
  max-width: 90%;
  line-height: 1.5;
  font-weight: 500;
}

.offers-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 8px 10px 4px;
}

/* Custom Scrollbar */
.offers-container::-webkit-scrollbar {
  width: 6px;
}
.offers-container::-webkit-scrollbar-track {
  background: rgba(107, 75, 138, 0.05);
  border-radius: 6px;
}
.offers-container::-webkit-scrollbar-thumb {
  background: var(--pink-glow);
  border-radius: 6px;
}
.offers-container::-webkit-scrollbar-thumb:hover {
  background: var(--pink-accent);
}

.offer-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 12px 14px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(42, 31, 69, 0.04), 0 1px 3px rgba(42, 31, 69, 0.02);
  flex-shrink: 0;
  min-height: 80px;
}

/* Hover Gradient Border Glow */
.offer-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(249, 212, 35, 0.8), rgba(255, 78, 80, 0.8), rgba(233, 30, 140, 0.8), rgba(188, 62, 111, 0.8));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  mask: 
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 2px;
}

/* Shimmer reflection */
.offer-item::after {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-25deg);
  transition: none;
  z-index: 1;
}

.offer-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 32px rgba(233, 30, 140, 0.15), 0 4px 12px rgba(82, 67, 126, 0.08);
  background: rgba(255, 255, 255, 0.95);
}

.offer-item:hover::before {
  opacity: 1;
}

.offer-item:hover::after {
  animation: shine 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shine {
  0% { left: -150%; }
  100% { left: 200%; }
}

.offer-icon-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  margin-right: 12px;
  position: relative;
  z-index: 2;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(42, 31, 69, 0.15);
  border: 1px solid rgba(107, 75, 138, 0.15);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.offer-item:hover .offer-icon-img {
  transform: scale(1.1) rotate(3deg);
  box-shadow: 0 8px 20px rgba(233, 30, 140, 0.25);
  border-color: rgba(233, 30, 140, 0.4);
}

.offer-details {
  flex: 1;
  position: relative;
  z-index: 2;
  border-right: 1px solid rgba(107, 75, 138, 0.1);
  margin-right: 12px;
  padding-right: 12px;
  min-width: 0;
}

.offer-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  line-height: 1.35;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-item:hover .offer-name {
  color: var(--pink-accent);
}

.offer-desc {
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.offer-item:hover .offer-desc {
  color: var(--text-dark);
}

.offer-action {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
}

.offer-action::after {
  content: '▶';
  font-size: 14px;
  transition: transform 0.3s ease;
}

.offer-item:hover .offer-action {
  color: var(--pink-accent);
  opacity: 1;
}

.offer-item:hover .offer-action::after {
  transform: translateX(4px);
}

/* ========== Waiting Status & Safe Badge ========== */
.waiting-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(233, 30, 140, 0.1);
  border: 1px solid rgba(233, 30, 140, 0.2);
  padding: 10px 16px;
  border-radius: 12px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--pink-accent);
  font-weight: 600;
  width: 100%;
  animation: pulseBg 2s infinite ease-in-out;
}

@keyframes pulseBg {
  0% { background: rgba(233, 30, 140, 0.05); }
  50% { background: rgba(233, 30, 140, 0.15); }
  100% { background: rgba(233, 30, 140, 0.05); }
}

.waiting-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(233, 30, 140, 0.3);
  border-top-color: var(--pink-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.waiting-count {
  font-weight: 800;
  color: var(--primary-purple);
}


