:root {
  --primary-gold: #c5a059;
  --accent-glow: rgba(197, 160, 89, 0.4);
  --bg-dark: #0f1113;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #e0e0e0;
  --serif-font: "Playfair Display", serif;
  --sans-font: "Inter", sans-serif;
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--sans-font);
  overflow-x: hidden;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
.serif {
  font-family: var(--serif-font);
  font-weight: 700;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 10px;
}

/* --- Global Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navbar --- */
.navbar {
  background: transparent;
  padding: 2rem 0;
  transition: var(--transition-smooth);
  z-index: 1000;
}

.navbar.scrolled {
  background: rgba(15, 17, 19, 0.95);
  padding: 1rem 0;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
  font-family: var(--serif-font);
  font-size: 1.8rem;
  color: var(--primary-gold) !important;
  letter-spacing: 2px;
}

.nav-link {
  color: white !important;
  margin: 0 1rem;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -5px;
  left: 0;
  background: var(--primary-gold);
  transition: 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Hero Section --- */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)),
    url("https://images.unsplash.com/photo-1481627834876-b7833e8f5570?q=80&w=2000&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-content {
  text-align: center;
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInDown 1.5s forwards 0.5s;
}

.hero-tagline {
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 1.5s forwards 1s;
}

.btn-premium {
  padding: 12px 35px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-gold {
  background: var(--primary-gold);
  color: black;
  border: 1px solid var(--primary-gold);
}

.btn-gold:hover {
  background: transparent;
  color: var(--primary-gold);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-gold.btn-gold--hover-black:hover {
  background: black;
  color: var(--primary-gold);
  box-shadow:
    0 0 20px var(--accent-glow),
    0 0 40px var(--accent-glow);
}

.btn-gold:disabled {
  background: transparent;
  color: var(--primary-gold);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline-white {
  border: 1px solid white;
  color: white;
  margin-left: 15px;
}

.btn-outline-white:hover {
  background: white;
  color: black;
}

/* --- About Section --- */
.about-section {
  padding: 120px 0;
  background: #15181b;
}

.about-img-container {
  position: relative;
  padding: 20px;
}

.about-img-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 80%;
  height: 80%;
  border: 2px solid var(--primary-gold);
  z-index: 0;
}

.about-img {
  width: 100%;
  position: relative;
  z-index: 1;
  filter: grayscale(40%) contrast(110%);
  transition: var(--transition-smooth);
}

.about-img:hover {
  filter: grayscale(0%);
}

/* --- Books Grid --- */
.books-section {
  padding: 100px 0;
  background:
    linear-gradient(rgba(15, 17, 19, 0.9), rgb(255 255 255 / 0%)),
    url(../images/texture-bg.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.book-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 30px;
  text-align: center;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-card:hover {
  transform: translateY(-15px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-gold);
}

.book-cover {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.book-card:hover .book-cover {
  transform: rotateY(15deg) scale(1.05);
  box-shadow: -10px 15px 40px rgba(0, 0, 0, 0.7);
}

/* --- Spotlight Section --- */
.spotlight {
  background:
    linear-gradient(90deg, #0f1113 40%, transparent 100%),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?q=80&w=2070&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  padding: 150px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--glass-bg);
  padding: 40px;
  border-radius: 10px;
  border-left: 4px solid var(--primary-gold);
  margin: 15px;
}

.stars {
  color: var(--primary-gold);
  margin-bottom: 15px;
}

/* --- Newsletter --- */
.newsletter {
  padding: 100px 0;
  background: linear-gradient(45deg, #1a1c1e, #0f1113);
  text-align: center;
}

.form-control-premium {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--glass-border);
  border-radius: 0;
  color: white;
  padding: 15px;
  margin-bottom: 20px;
}

.form-control-premium:focus {
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--primary-gold);
  color: white;
}

.form-control-premium::placeholder {
  color: #888;
}

.form-control-premium.form-control-premium--on-white {
  border-bottom: 1px solid rgba(0, 0, 0, 0.43);
  color: #000;
  padding-top: 0;
}

.form-select.form-control-premium {
  background-color: #0f1113 !important;
}

.form-select.form-control-premium option {
  background-color: #0f1113;
  border-color: #0f1113;
}

/* --- Footer --- */
footer {
  padding: 60px 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.social-link {
  color: var(--text-main);
  margin: 0 15px;
  font-size: 1.5rem;
  transition: 0.3s;
  text-decoration: none;
}

.social-link:hover {
  color: var(--primary-gold);
  transform: translateY(-5px);
  display: inline-block;
}

/* --- Animations Keyframes --- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Floating Animation */
.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 60px;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 2px;
  background: var(--primary-gold);
  bottom: -15px;
  left: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .spotlight {
    background: #0f1113;
    padding: 80px 0;
  }

  .btn-outline-white {
    margin-left: 0;
    margin-top: 15px;
    width: 100%;
  }

  .btn-gold {
    width: 100%;
  }

  .spotlight-book-container {
    margin-top: 40px;
    justify-content: center;
    display: flex;
  }
}

/* --- Spotlight Book 3D --- */
.spotlight-book-container {
  perspective: 1200px;
  position: relative;
  z-index: 10;
}

.spotlight-book {
  transform-style: preserve-3d;
  transition:
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.6s;
  box-shadow: 0 25px 50px 3px rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  width: 100%;
  max-width: 320px;
  display: block;
  margin: 0 auto;
  position: relative;
}

.spotlight-book::before {
  content: "";
  position: absolute;
  top: 2%;
  left: 1%;
  width: 98%;
  height: 96%;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  mix-blend-mode: overlay;
  z-index: 2;
}

.spotlight-book:hover {
  transform: rotateY(-15deg) rotateX(5deg) scale(1.05);
  box-shadow:
    20px 50px 60px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(197, 160, 89, 0.15);
  /* Subtle gold glow */
}

/* --- Event Showcase Section --- */
.event-showcase-wrapper {
  position: relative;
  padding: 40px 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0%,
    transparent 100%
  );
  border-top: 1px solid var(--glass-border);
  margin-top: 2rem;
}

.event-label {
  font-family: var(--sans-font);
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--primary-gold);
  font-size: 0.75rem;
  opacity: 0.8;
}

.event-images-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
  perspective: 1000px;
  /* For 3D effect */
  flex-wrap: wrap;
}

.event-frame {
  position: relative;
  width: 100%;
  max-width: 350px;
  flex: 1 1 280px;
  transition: var(--transition-smooth);
}

.event-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  filter: grayscale(80%) sepia(20%);
  /* Nostalgic/Noir feel */
  transition: var(--transition-smooth);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.event-img.lightbox-trigger {
  cursor: pointer;
}

/* Hover Effects "Wow Factor" */
.event-frame:hover .event-img {
  filter: grayscale(0%) sepia(0%);
  transform: scale(1.03);
  border-color: var(--primary-gold);
  box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15);
}

.event-frame.left:hover {
  transform: rotateY(5deg);
  /* Slight 3D tilt */
}

.event-frame.center:hover {
  transform: scale(1.02);
}

.event-frame.right:hover {
  transform: rotateY(-5deg);
  /* Slight 3D tilt */
}

/* Decorative Corners */
.frame-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--primary-gold);
  border-style: solid;
  transition: 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.event-frame:hover .frame-corner {
  opacity: 1;
  width: 100%;
  height: 100%;
}

.frame-corner.top-left {
  top: -5px;
  left: -5px;
  border-width: 1px 0 0 1px;
}

.frame-corner.bottom-right {
  bottom: -5px;
  right: -5px;
  border-width: 0 1px 1px 0;
}

.frame-corner.top-right {
  top: -5px;
  right: -5px;
  border-width: 1px 1px 0 0;
}

.frame-corner.bottom-left {
  bottom: -5px;
  left: -5px;
  border-width: 0 0 1px 1px;
}

/* Caption Styling */
.event-caption-box {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.event-caption-box::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--primary-gold);
  margin: 0 auto 15px;
  opacity: 0.5;
}

.event-text {
  color: #888;
  font-family: var(--serif-font);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .event-images-container {
    flex-direction: column;
    gap: 20px;
  }

  .event-frame:hover {
    transform: none !important;
  }
}

/* --- Shopping Cart Sidebar --- */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  max-width: 350px;
  height: 100vh;
  /* Dynamic viewport: shrinks while mobile browser toolbars are showing */
  height: 100dvh;
  background: #0f1113;
  z-index: 2000;
  transition: var(--transition-smooth);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}

.cart-sidebar.open {
  right: 0;
}

.cart-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1999;
  transition: 0.3s;
  backdrop-filter: blur(5px);
}

.cart-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(197, 160, 89, 0.05);
}

.cart-title {
  font-family: var(--serif-font);
  color: var(--primary-gold);
  margin: 0;
  font-size: 1.5rem;
}

.close-cart {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  transition: 0.3s;
}

.close-cart:hover {
  color: var(--primary-gold);
  transform: rotate(90deg);
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  background: var(--glass-bg);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
  align-items: center;
}

.cart-item img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 2px;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-family: var(--serif-font);
  font-size: 1rem;
  margin-bottom: 5px;
  display: block;
}

.cart-item-price {
  color: var(--primary-gold);
  font-size: 0.9rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  transition: 0.3s;
}

.cart-item-remove:hover {
  color: #591616;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 17, 19, 0.95);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif-font);
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: white;
}

/* --- Cart Icon in Navbar --- */
.nav-cart-btn {
  position: relative;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 20px;
  transition: 0.3s;
}

.nav-cart-btn:hover {
  color: var(--primary-gold);
}

/* Collapsed navbar: cart sits beside the toggler instead of inside the menu */
@media (max-width: 991.98px) {
  .nav-cart-btn {
    margin-left: auto;
    margin-right: 12px;
  }
}

/* Small phones: brand shrinks so brand, cart and toggler share one row */
@media (max-width: 400px) {
  .navbar-brand {
    font-size: clamp(1.2rem, 6.5vw, 1.5rem);
  }
}

.cart-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary-gold);
  color: black;
  font-size: 0.7rem;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--primary-gold);
  border-radius: 50%;
  background: rgba(15, 17, 19, 0.95);
  color: var(--primary-gold);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
}

/* Focused stays visible so scrolling down never strands keyboard focus */
.back-to-top.visible,
.back-to-top:focus-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--primary-gold);
  color: black;
}

@media (min-width: 992px) {
  .back-to-top {
    right: 24px;
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

/* --- Image Lightbox --- */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  position: relative;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxPop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 2px solid var(--primary-gold);
  box-shadow: 0 20px 60px rgba(197, 160, 89, 0.3);
  animation: lightboxSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: var(--primary-gold);
  font-size: 3rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  z-index: 10;
}

.lightbox-close:hover {
  color: white;
  transform: rotate(90deg) scale(1.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-gold);
  font-size: 2rem;
  cursor: pointer;
  padding: 10px 20px;
  transition: var(--transition-smooth);
  z-index: 10;
  opacity: 0.7;
}

.lightbox-nav:hover {
  color: white;
  opacity: 1;
  transform: translateY(-50%) scale(1.2);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-nav.disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.lightbox-nav.disabled:hover {
  transform: translateY(-50%) scale(1);
  color: var(--primary-gold);
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--primary-gold);
  font-family: var(--serif-font);
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
  z-index: 10;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 2rem;
  }

  .lightbox-nav {
    font-size: 1.5rem;
    padding: 5px 10px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* --- Bundle Section --- */
.bundle-section {
  padding: 100px 0;
  background: linear-gradient(
    135deg,
    rgba(197, 160, 89, 0.1) 0%,
    rgba(15, 17, 19, 0.8) 100%
  );
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.bundle-card {
  background: var(--glass-bg);
  border: 2px solid var(--primary-gold);
  border-radius: 10px;
  padding: 50px 40px;
  position: relative;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bundle-card:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(197, 160, 89, 0.2);
  transform: translateY(-10px);
}

.bundle-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-gold);
  color: #0f1113;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.bundle-cover {
  width: 100%;
  height: auto;
  box-shadow: 0 15px 35px rgba(197, 160, 89, 0.25);
  margin-bottom: 20px;
}

.bundle-formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.bundle-format-option {
  background: rgba(197, 160, 89, 0.1);
  border: 1px solid var(--primary-gold);
  border-radius: 8px;
  padding: 20px 15px;
  text-align: center;
  transition: var(--transition-smooth);
}

.bundle-format-option:hover {
  background: rgba(197, 160, 89, 0.2);
  transform: scale(1.05);
}

.format-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.format-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .bundle-section {
    padding: 60px 0;
  }

  .bundle-card {
    padding: 40px 25px;
  }

  .bundle-formats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.cart-sidebar {
  width: 100%;
  right: -100%;
}
