/* ==========================================================================
   LAYOUT STRUCTURE & CENTRALIZED ELEMENT RULES
   ========================================================================== */
#header {
  z-index: 5;
  box-sizing: border-box;
  display: inline-block;
  position: fixed;
  top: 0;
  width: 100%;
  margin: 0;
  padding: 0 1rem;
  background-color: #000;
}

.nav-logo {
  float: left;
  margin: 1rem .5rem;
}

.nav-links {
  float: right;
  padding: 0 20% 0 0;
  margin: 0;
}

.maintenance-alert {
  color: red;
  font-weight: bold;
}

.site-subtitle {
  text-align: center; 
  font-size: 1.8rem; 
  margin-bottom: 0.5rem;
}

.site-declaration {
  text-align: center; 
  color: #ffcc00; 
  letter-spacing: 2px; 
  margin-top: 0; 
  margin-bottom: 0.5rem;
}

.site-tagline {
  text-align: center; 
  font-style: italic; 
  font-size: 1.2rem; 
  margin-top: 0;
}

.section-divider {
  width: 50%; 
  margin: 2rem auto;
  border: 0;
  border-top: 1px solid #333;
}

.section-title-gold {
  text-align: center; 
  color: #ffcc00; 
  letter-spacing: 2px; 
  margin-top: 2rem; 
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   RESPONSIVE MATRIX CONTAINERS (THE BULLETPROOF SHIELD)
   ========================================================================== */
/* Desktop Wide Monitors */
@media screen and (min-width: 1281px) {
  #main {
    background-color: rgba(0, 0, 0, .8);
    width: 75%;
    max-width: 1100px; /* Absolutely caps the site width on massive displays */
    margin: 5% auto 6% auto;
    padding: 3% 5%;
    border: none;
  }
  .book-grid-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 40px; /* Beautiful proportional layout separation */
    width: 100%;
    margin-bottom: 2rem;
    clear: both;
  }
}

/* Medium Laptops & Desktops */
@media screen and (min-width: 901px) and (max-width: 1280px) {
  #main {
    background-color: rgba(0, 0, 0, .8);
    width: 85%;
    margin: 6% auto 6% auto;
    padding: 3% 4%;
    border: none;
  }
  .book-grid-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 2rem;
    clear: both;
  }
}

/* Mobile Screens & Smartyassedphones */
@media screen and (max-width: 900px) {
  #main {
    background-color: rgba(0, 0, 0, .8);
    width: 100%;
    margin: 4rem auto 0 auto;
    padding: 4% 3%;
    border: none;
  }
  .book-grid-row {
    display: block; /* Completely collapses rows on mobile devices */
    width: 100%;
  }
  .book-card {
    margin: 20px auto !important; /* Stacks cards cleanly in single lane */
  }
}

/* ==========================================================================
   THE ZENTAO KINETIC FLIP CARD MATRIX 
   ========================================================================== */
.book-card {
    background-color: transparent;
    width: 300px;         
    height: 450px;        
    perspective: 1000px;  
    cursor: pointer;
}

.book-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
    transform-style: preserve-3d;
}

@media (hover: hover) {
    .book-card:hover .book-card-inner { transform: rotateY(180deg); }
}

.book-card.flipped .book-card-inner { transform: rotateY(180deg); }

.book-card-front, .book-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
    overflow: hidden;
}

.book-card-front { background-color: #000000; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }

.book-card-back {
    background-color: rgba(15, 15, 15, 0.95) !important; 
    border: 1px solid #dbb065;                       
    color: #dbb065;
    transform: rotateY(180deg);                      
    padding: 25px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.blurb-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #a9b0b1;
    text-align: left;
    overflow-y: auto; 
    margin-bottom: 15px;
}

.buy-button {
    background: #dbb065;
    color: #000000 !important;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 0.85rem;
    border-radius: 3px;
    transition: background 0.3s;
}
.buy-button:hover { background: #f1c473; }

.footnav-wrapper {
  float: right;
  padding: 0;
  margin: 0;
}