@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Open+Sans:wght@400;600;700&display=swap');

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

:root {
  --primary: #1d3f73;
  --primary-dark: #143867;
  --secondary: #264f8b;
  --gold: #d4af37;
  --dark: #212a3c;
  --light: #f5f7fb;
  --gray: #5e6780;
  --line: #e2e7f1;
  --danger: #b51432;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: #fff;
  color: var(--dark);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(8, 28, 66, 0.05);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 58px;
}

.logo {
  font-family: "Marcellus", serif;
  font-size: 1.75rem;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
}

.logo small {
  display: block;
  font-family: "Open Sans", sans-serif;
  font-size: 0.68rem;
  color: #667089;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 4px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a {
  color: #33425f;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

.nav a:hover,
.nav a.active {
  text-decoration: none;
  background: #edf3ff;
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url('https://images.unsplash.com/photo-1544006659-f0b21884ce1d?w=1600') center/cover;
  color: #fff;
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-dark);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary);
  text-decoration: none;
}

.btn-secondary {
  background: var(--gold);
  color: var(--dark);
}

.btn-secondary:hover {
  background: #c9a227;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: #fff;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* Section */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--gray);
}

.section-alt {
  background: #fff;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(8, 28, 66, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(8, 28, 66, 0.12);
}

a.card {
  cursor: pointer;
}

.card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.card-text {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.card-meta {
  font-size: 0.85rem;
  color: #999;
  display: flex;
  justify-content: space-between;
}

/* Product Card */
.product-card .card-body {
  display: flex;
  flex-direction: column;
}

.product-card .btn {
  margin-top: auto;
}

/* Event Card */
.event-card .event-date {
  background: var(--primary);
  color: #fff;
  padding: 15px;
  text-align: center;
  position: absolute;
  top: 15px;
  left: 15px;
  border-radius: 5px;
}

.event-card .event-date .day {
  font-size: 1.5rem;
  font-weight: 700;
}

.event-card .event-date .month {
  font-size: 0.8rem;
  text-transform: uppercase;
}

.event-card .card-image {
  position: relative;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

.event-info span {
  font-size: 0.9rem;
  color: var(--gray);
}

/* News Card */
.news-card {
  cursor: pointer !important;
}

.news-card .card-image {
  height: 180px;
}

.news-card .card-meta {
  margin-bottom: 10px;
}

/* Page Header */
.page-header {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #e6eeff;
  padding: 52px 0;
  text-align: center;
}

.page-header h1 {
  font-family: "Marcellus", serif;
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 10px;
}

.page-header p {
  opacity: 0.9;
}

/* Content Page */
.content-page {
  padding: 40px 0;
}

.content-page .content {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content-page .content h1,
.content-page .content h2,
.content-page .content h3 {
  margin: 20px 0 10px;
  color: var(--dark);
}

.content-page .content p {
  margin-bottom: 15px;
  color: var(--gray);
}

/* Footer */
.footer {
  background: #0e1625;
  color: #c3cee8;
  padding: 34px 0;
  border-top: 4px solid #243d6d;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 0;
}

.footer-section h3 {
  margin-bottom: 10px;
  font-size: 1.7rem;
  color: #fff;
  font-family: "Marcellus", serif;
}

.footer-section p,
.footer-section a {
  color: #c3cee8;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-section a:hover {
  color: #fff7d5;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #2a3650;
  color: #8f9dbd;
  font-size: 0.9rem;
  margin-top: 18px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px;
  color: var(--gray);
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
  padding: 6px 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(8, 28, 66, 0.12);
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 8px;
  }

  .nav.active {
    display: flex;
  }

  .logo {
    font-size: 1.6rem;
  }

  .logo small {
    font-size: 0.62rem;
    letter-spacing: 1.3px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 40px 0;
  }

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

/* ============ AUTH STYLES ============ */
.btn-signin {
  background: linear-gradient(180deg, #dcb44a, #c9982f);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
}
.btn-signin:hover {
  background: linear-gradient(180deg, #d3aa3f, #bd8f28);
}
.user-menu {
  position: relative;
  display: inline-flex;
}
.user-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.user-avatar {
  width: 42px;
  height: 42px;
  border: 2px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.user-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
}
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 22px rgba(26, 45, 84, 0.2);
  min-width: 260px;
  z-index: 1000;
  overflow: hidden;
}
.user-dropdown.show {
  display: block;
}
.user-profile {
  padding: 12px 14px;
  border-bottom: 1px solid #efefef;
}
.user-profile-name {
  color: #1f2f4c;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-profile-email {
  color: #667089;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-btn {
  width: 100%;
  border: none;
  background: #fff;
  color: #27375a;
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.user-dropdown-btn:hover {
  background: #f5f8ff;
}
#authBtn {
  display: flex;
  align-items: center;
}
