/* ==================== HOMEPAGE ADDITIONS ==================== */

/* Hero */
.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
  min-height: 520px;
}
.hero-search {
  border-radius: 50rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
.hero-search .form-control:focus { box-shadow: none; }

/* Category tiles */
.category-tile {
  transition: all .25s ease;
  border-radius: 1rem;
}
.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(79,70,229,.15) !important;
  color: #4f46e5;
}
.category-tile .icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(79,70,229,.1);
  color: #4f46e5;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  transition: all .25s ease;
}
.category-tile:hover .icon-circle {
  background: #4f46e5;
  color: #fff;
  transform: scale(1.05);
}

/* Product cards */
.product-card {
  transition: all .3s ease;
  border-radius: 1rem;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0,0,0,.12) !important;
}
.product-card img {
  height: 220px;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover img { transform: scale(1.06); }
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Membership card (shared with dashboard) */
.membership-card {
  background: linear-gradient(135deg, #1e293b, #4f46e5);
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease;
}
.membership-card::after {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
  border-radius: 50%;
}
.membership-card.gold { background: linear-gradient(135deg, #78350f, #f59e0b); }
.membership-card.platinum { background: linear-gradient(135deg, #0f172a, #475569); }
.membership-card:hover { transform: translateY(-4px) rotate(0deg) !important; }

.badge-card-silver {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
  color: #333;
}
.badge-card-gold {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #333;
}
.badge-card-platinum {
  background: linear-gradient(135deg, #334155, #64748b);
  color: #fff;
}

/* Step numbers (How it works) */
.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(79,70,229,.25);
}

/* Section polish */
section h2 { letter-spacing: -0.02em; }

/* Responsive */
@media (max-width: 575.98px) {
  .hero { min-height: auto; }
  .hero h1 { font-size: 2rem; }
  .product-card img { height: 180px; }
}

/* ==================== HEADER / NAVBAR ==================== */

/* Top info bar */
.topbar {
  font-size: .8rem;
  letter-spacing: .01em;
}
.topbar a {
  text-decoration: none;
  transition: color .2s;
}
.topbar a:hover { color: #fff !important; }

/* Navbar polish */
.navbar-brand {
  letter-spacing: -.02em;
}
.navbar .nav-link {
  font-weight: 500;
  color: #334155 !important;
  padding: .5rem .9rem !important;
  border-radius: .5rem;
  transition: all .2s ease;
}
.navbar .nav-link:hover {
  color: #4f46e5 !important;
  background: rgba(79,70,229,.06);
}
.navbar .nav-link.active {
  color: #4f46e5 !important;
}

/* Account avatar button */
.navbar .dropdown-toggle::after {
  margin-left: .25rem;
  vertical-align: middle;
  opacity: .5;
}
.navbar .dropdown-menu {
  animation: dropdownFade .15s ease;
}
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  padding: .5rem 1rem;
  font-size: .92rem;
  transition: background .15s;
}
.dropdown-item:hover {
  background: rgba(79,70,229,.06);
}
.dropdown-header {
  font-size: .72rem;
  letter-spacing: .08em;
  padding-bottom: .25rem;
}

/* Cart badge */
.navbar .badge {
  font-weight: 700;
  padding: .25em .5em;
}

/* Flash alerts */
.alert {
  border-left: 4px solid currentColor !important;
}
.alert-success { color: #065f46; border-left-color: #10b981 !important; }
.alert-danger  { color: #7f1d1d; border-left-color: #ef4444 !important; }
.alert-warning { color: #78350f; border-left-color: #f59e0b !important; }
.alert-info    { color: #164e63; border-left-color: #06b6d4 !important; }

/* Mobile tweaks */
@media (max-width: 991.98px) {
  .navbar .nav-link {
    padding: .75rem 1rem !important;
    border-radius: 0;
  }
  .navbar .dropdown-menu {
    border: none;
    box-shadow: none !important;
    background: #f8fafc;
    margin-left: .75rem;
  }
  .navbar .btn-primary,
  .navbar .btn-link {
    width: 100%;
    text-align: center;
    margin-top: .5rem;
  }
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: #0f172a !important;
  color: #cbd5e1;
}
.site-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color .2s;
}
.site-footer a:hover {
  color: #fff;
}

.footer-links li {
  margin-bottom: .55rem;
}
.footer-links a {
  font-size: .9rem;
  position: relative;
  padding-left: 0;
  transition: padding-left .2s ease, color .2s;
}
.footer-links a:hover {
  padding-left: 6px;
  color: #fff;
}
.footer-links a::before {
  content: '›';
  position: absolute;
  left: -10px;
  opacity: 0;
  color: #6366f1;
  font-weight: 700;
  transition: opacity .2s, left .2s;
}
.footer-links a:hover::before {
  opacity: 1;
  left: -6px;
}

/* Social buttons */
.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8 !important;
  transition: all .25s ease;
  font-size: 1rem;
}
.social-btn:hover {
  background: #4f46e5;
  color: #fff !important;
  transform: translateY(-3px);
}

/* Newsletter */
.newsletter-form .form-control {
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: .65rem 1rem;
  font-size: .9rem;
}
.newsletter-form .form-control::placeholder {
  color: #64748b;
}
.newsletter-form .form-control:focus {
  background: rgba(255,255,255,.12);
  box-shadow: none;
  color: #fff;
}

/* Payment badges */
.site-footer .badge {
  font-weight: 600;
  padding: .4em .7em;
  font-size: .7rem;
  letter-spacing: .03em;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1030;
  border: none;
  transition: transform .2s ease, opacity .2s ease;
}
.back-to-top.show {
  display: inline-flex;
  animation: bttFade .25s ease;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(79,70,229,.4) !important;
}
@keyframes bttFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer responsive */
@media (max-width: 767.98px) {
  .site-footer {
    text-align: center;
  }
  .site-footer .d-flex.gap-2.mt-3 {
    justify-content: center;
  }
  .footer-links a:hover {
    padding-left: 0;
  }
  .footer-links a::before {
    display: none;
  }
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
}