/* Homepage-specific styles */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #1a1a2e;
  --ink2: #2d2d44;
  --paper: #faf8f4;
  --warm: #f5f0e8;
  --accent: #c0392b;
  --accent2: #e74c3c;
  --gold: #d4a017;
  --muted: #7a7a8c;
  --border: #e8e4dc;
  --white: #ffffff;
  --card-shadow: 0 2px 12px rgba(26, 26, 46, 0.08);
  --card-shadow-hover: 0 8px 32px rgba(26, 26, 46, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* ORANGE HEADER STYLES */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background: #e67e22;
  border-bottom: 2px solid #d35400;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.logo-b {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Playfair Display', serif;
  cursor: pointer;
}

.logo-b span {
  color: #fff3e0;
}

header nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

header nav .nav-link {
  color: #fff;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 14px;
}

header nav .nav-link:hover {
  color: #fff3e0;
  text-decoration: underline;
}

.hero-banner {
  position: relative;
  height: 480px;
  background: url('../images/bgWeb.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-banner .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 0 24px;
}

.store-location {
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  margin-bottom: 1rem;
  color: #f5e6d3;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-main-line {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.hero-main-line-2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-family: 'Playfair Display', serif;
  color: #ffcc80;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.hero-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.8rem;
  line-height: 1.6;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-banner .btn-primary {
  background: #e67e22;
  color: white;
  padding: 10px 28px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-banner .btn-primary:hover {
  background: #d35400;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
}

.hero-banner .btn-secondary {
  background: transparent;
  color: white;
  padding: 10px 28px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  transition: all 0.3s;
  border: 1.5px solid #e67e22;
  cursor: pointer;
}

.hero-banner .btn-secondary:hover {
  background: rgba(230, 126, 34, 0.2);
  border-color: #d35400;
  transform: translateY(-2px);
}

header {
  animation: slideDown 0.75s ease-out both;
}

.logo-b,
.logo-icon {
  animation: popIn 0.8s ease-out both;
}

header nav .nav-link {
  animation: fadeInUp 0.85s ease-out both;
}

header nav .nav-link:nth-child(1) { animation-delay: 0.3s; }
header nav .nav-link:nth-child(2) { animation-delay: 0.35s; }

.hero-content {
  animation: fadeInUp 0.9s ease-out both;
}

.store-location {
  animation: fadeInUp 0.95s ease-out both;
}

.hero-main-line {
  animation: popIn 1s ease-out both;
}

.hero-main-line-2 {
  animation: popIn 1.05s ease-out both;
}

.hero-description {
  animation: fadeInUp 1.1s ease-out both;
}

.hero-buttons a {
  animation: popIn 1.15s ease-out both;
}

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  animation: fadeInUp 0.95s ease-out 0.2s both;
}

section {
  padding: 3rem 0;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s both;
}

/* Section header with POPULAR label and See all link */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e8e4dc;
  padding-bottom: 0.75rem;
  animation: fadeInUp 1s ease-out 0.25s both;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--ink);
  margin-bottom: 0;
  text-align: left;
  animation: popIn 1.05s ease-out 0.3s both;
}

.popular-label {
  font-size: 0.85rem;
  background: #e67e22;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 15px;
  vertical-align: middle;
  font-weight: 600;
  letter-spacing: 1px;
}

.see-all-link {
  color: #e67e22;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.see-all-link:hover {
  color: #d35400;
  text-decoration: underline;
}

.see-all-link i {
  font-size: 0.75rem;
  margin-left: 4px;
}

#most-viewed,
#new-arrivals {
  padding: 2rem 0 3rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
  padding-bottom: 8px;
  animation: fadeInUp 1.05s ease-out 0.3s both;
}

.book-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  animation: cardFadeIn 0.8s ease-out both;
}

.book-card:nth-child(odd) {
  animation-delay: 0.35s;
}

.book-card:nth-child(even) {
  animation-delay: 0.4s;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: transparent;
}

.book-cover-wrapper {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
}

.book-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover img {
  transform: scale(1.05);
}

.episode-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffcc80;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.book-info {
  padding: 10px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.book-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-genre {
  font-size: 11px;
  color: #e67e22;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.book-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.chapter-count {
  font-size: 11px;
  color: var(--muted);
}

.chapter-count i {
  font-size: 10px;
  margin-right: 3px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #f39c12;
}

.rating i {
  font-size: 10px;
}

.book-card .views {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* MODAL STYLES - PORTRAIT DESCRIPTION */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  max-width: 500px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-body {
  padding: 24px;
}

#modal-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #2d2d44, #1a1a2e);
  border-radius: 12px;
  display: block;
  margin: 0 auto 20px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.details {
  text-align: center;
}

.details h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.details p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.details strong {
  color: var(--ink);
  font-weight: 600;
}

/* Portrait style description - centered and elegant */
.description-portrait {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.description-portrait p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  text-align: center;
  font-style: normal;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 8px;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--muted);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.08);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 201;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.16);
  color: var(--ink);
}

#about {
  padding: 4rem 0;
  margin-top: 2rem;
}

#about h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-family: 'Playfair Display', serif;
}

#about p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.map-container {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.map-container iframe {
  display: block;
  border-radius: 12px;
  width: 100%;
}

footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  margin-top: 3rem;
}

.footer-contact {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.footer-contact h3 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.contact-grid div {
  padding: 1rem;
  background: rgba(192, 57, 43, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  font-size: 14px;
}

.contact-grid span {
  display: block;
  font-weight: 600;
  color: #fff;
  margin-top: 0.5rem;
}

.footer-copy {
  text-align: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 1.15s ease-out 0.35s both;
}

footer,
.footer-contact,
.contact-grid div {
  animation: fadeInUp 1.15s ease-out 0.35s both;
}

.bubble-chat-head {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #e67e22;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255,255,255,0.2);
  transition: all 0.2s ease;
  z-index: 1000;
  cursor: pointer;
  text-decoration: none;
  color: white;
  animation: gentlePulse 2s infinite ease-in-out;
}

.bubble-chat-head:hover {
  transform: scale(1.08);
  background: #d35400;
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4), 0 0 0 4px rgba(255,255,240,0.3);
}

.bubble-chat-head i {
  font-size: 28px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gentlePulse {
  0% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 0 0 0px rgba(230,126,34,0.5);
  }
  70% {
    box-shadow: 0 6px 16px rgba(0,0,0,0.25), 0 0 0 8px rgba(230,126,34,0);
  }
  100% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 0 0 0px rgba(230,126,34,0);
  }
}

.admin-corner {
  display: none;
}

@media (max-width: 768px) {
  header {
    padding: 0.8rem 1rem;
    flex-direction: column;
    gap: 0.8rem;
  }
  .logo-container {
    justify-content: center;
  }
  header nav {
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }
  .hero-banner {
    height: 420px;
  }
  .hero-main-line {
    font-size: 2rem;
  }
  .hero-main-line-2 {
    font-size: 2rem;
  }
  .hero-description {
    font-size: 0.85rem;
  }
  main {
    padding: 0 16px;
  }
  .section-header h2 {
    font-size: 1.5rem;
  }
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  .footer-contact {
    padding: 2rem 1rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .modal-content {
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    height: 380px;
  }
  .store-location {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
  }
  .hero-main-line {
    font-size: 1.5rem;
  }
  .hero-main-line-2 {
    font-size: 1.5rem;
  }
  .hero-description {
    font-size: 0.75rem;
    margin-bottom: 1.2rem;
  }
  .hero-buttons {
    gap: 0.75rem;
  }
  .hero-banner .btn-primary,
  .hero-banner .btn-secondary {
    padding: 7px 18px;
    font-size: 0.8rem;
  }
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bubble-chat-head {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .bubble-chat-head i {
    font-size: 24px;
  }
  .section-header {
    flex-direction: column;
    gap: 10px;
  }
  .popular-label {
    display: inline-block;
    margin-left: 0;
    margin-top: 5px;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  .logo-b {
    font-size: 1.2rem;
  }
  #modal-img {
    max-width: 140px;
  }
}
