/* General Styling */
:root {
    --primary-color: #8B0000; /* Merah maroon/gelap dari logo */
    --secondary-color: #A52A2A; /* Sedikit lebih terang dari primary untuk aksen */
    --accent-color: #000000; /* Hitam dari logo, untuk teks atau elemen kuat */
    --text-color: #333333; /* Hampir hitam untuk teks utama */
    --light-text-color: #555555;
    --bg-light: #f8f8f8; /* Background sangat terang, hampir putih */
    --border-color: #cccccc; /* Abu-abu terang untuk border */
    --box-shadow-light: 0 4px 8px rgba(0, 0, 0, 0.1);
    --white-color: #ffffff; /* Putih murni */
}

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

body {
    font-family: 'Roboto', sans-serif; /* Changed to Roboto for body text */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color); /* Background putih bersih */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif; /* Merriweather for headings */
    color: var(--accent-color);
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color); /* Tautan berwarna merah gelap */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: none;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary-color); /* Tombol utama merah gelap */
    color: var(--white-color);
}

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

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

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

.btn-tertiary { /* Untuk promo banner CTA */
    background-color: var(--accent-color); /* Tombol promo hitam */
    color: var(--white-color);
    font-weight: bold;
}

.btn-tertiary:hover {
    background-color: var(--text-color); /* Sedikit lebih terang dari hitam */
    text-decoration: none;
}

/* Header */
/* ===== Header (Modern, rapih, premium) ===== */
.main-header{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color, #e9e9ef);
  box-shadow: 0 8px 22px rgba(16,24,40,.06);
}

.main-header .header-inner{
  width: min(1200px, 92%);
  margin: 0 auto;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;

  padding: 12px 0;
}

/* Logo */
.logo{ margin:0; line-height:0; }
.logo a{ display:flex; align-items:center; text-decoration:none; }
.logo a img{
  height: 56px;       /* kunci: bikin pas header */
  width: auto;
  object-fit: contain;
  display:block;
}

/* Nav */
.main-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 22px;
}

.main-nav ul li{ position:relative; margin:0; }

.main-nav ul li a{
  color: var(--text-color, #1f2937);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 10px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  gap: 8px;
  text-decoration:none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.main-nav ul li a:hover{
  background: rgba(30,42,120,.08);
  color: var(--primary-color, #1e2a78);
}

/* Dropdown (lebih halus & rapi) */
.main-nav .dropdown{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;

  min-width: 220px;
  padding: 10px;
  margin: 0;
  list-style:none;

  background:#fff;
  border: 1px solid var(--border-color, #e9e9ef);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16,24,40,.12);

  opacity: 0;
  transform: translateY(6px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.main-nav li:hover > .dropdown{
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.main-nav .dropdown li{
  border: 0;
  margin:0;
}

.main-nav .dropdown li a{
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.main-nav .dropdown li a:hover{
  background: rgba(30,42,120,.08);
}

/* Actions */
.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
}

/* Search pill */
.search-wrap{
  position: relative;
  display:flex;
  align-items:center;
}

.search-wrap i{
  position:absolute;
  left: 12px;
  font-size: 14px;
  color: rgba(31,41,55,.55);
}

.header-actions input[type="search"]{
  width: 240px;
  padding: 10px 12px 10px 36px;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e9e9ef);
  background: #f7f8fc;
  color: var(--text-color, #1f2937);
  outline:none;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.header-actions input[type="search"]:focus{
  background:#fff;
  border-color: rgba(30,42,120,.35);
  box-shadow: 0 0 0 5px rgba(30,42,120,.12);
}

/* Icon button */
.icon-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;

  background:#fff;
  border: 1px solid var(--border-color, #e9e9ef);
  box-shadow: 0 10px 22px rgba(16,24,40,.06);

  color: var(--accent-color, #111827);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.icon-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(30,42,120,.25);
  box-shadow: 0 16px 30px rgba(16,24,40,.10);
  color: var(--primary-color, #1e2a78);
}

/* Badge cart */
#cart-count{
  position:absolute;
  transform: translate(12px, -12px);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;

  background: var(--primary-color, #1e2a78);
  color:#fff;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid #fff;
}

/* Responsive */
@media (max-width: 992px){
  .main-header .header-inner{
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }

  .main-nav{ display:none; } /* kalau mau mobile menu, bilang ya */
  .header-actions input[type="search"]{ width: 180px; }
  .logo a img{ height: 48px; }
}

@media (max-width: 576px){
  .header-actions input[type="search"]{ width: 140px; }
}

/* ===== Mobile Navbar (Drawer) ===== */
.nav-toggle{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e9e9ef);
  background:#fff;
  box-shadow: 0 10px 22px rgba(16,24,40,.06);
  align-items:center;
  justify-content:center;
  gap: 4px;
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--accent-color, #111827);
  border-radius: 2px;
}

@media (max-width: 992px){
  .nav-toggle{ display:inline-flex; }
}

/* Overlay */
.mobile-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(2px);
  z-index: 1200;
}

/* Drawer panel */
.mobile-drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 88vw);
  background: #fff;
  border-left: 1px solid var(--border-color, #e9e9ef);
  box-shadow: -20px 0 60px rgba(16,24,40,.18);
  z-index: 1300;

  transform: translateX(105%);
  transition: transform .25s ease;
}

.mobile-drawer.is-open{
  transform: translateX(0);
}

.mobile-drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border-color, #e9e9ef);
}

.mobile-brand img{
  height: 44px;
  width: auto;
  object-fit: contain;
  display:block;
}

.mobile-close{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e9e9ef);
  background:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.mobile-drawer__body{
  padding: 14px;
}

/* Search inside drawer */
.mobile-search{
  position: relative;
  margin-bottom: 14px;
}
.mobile-search i{
  position:absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: rgba(31,41,55,.55);
}
.mobile-search input{
  width:100%;
  padding: 11px 12px 11px 36px;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e9e9ef);
  background: #f7f8fc;
  outline:none;
}

/* Nav links */
.mobile-nav{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.mobile-link, .mobile-sublink{
  text-decoration:none;
  color: var(--text-color, #1f2937);
  font-weight: 700;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fff;
}
.mobile-link:hover, .mobile-sublink:hover{
  background: rgba(30,42,120,.08);
  border-color: rgba(30,42,120,.12);
  color: var(--primary-color, #1e2a78);
}

.mobile-accordion{
  width:100%;
  text-align:left;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background:#fff;

  font-weight: 800;
  color: var(--text-color, #1f2937);
  cursor:pointer;
}
.mobile-accordion:hover{
  background: rgba(30,42,120,.08);
  border-color: rgba(30,42,120,.12);
  color: var(--primary-color, #1e2a78);
}

.mobile-panel{
  display:flex;
  flex-direction:column;
  gap: 6px;
  padding-left: 8px;
}
.mobile-sublink{
  font-weight: 700;
  background: #f7f8fc;
}

/* Lock scroll when open */
body.drawer-open{
  overflow: hidden;
}

/* End Header */

/* Hero Section */

.hero-sainstext{
  background:#fff;
  padding: 80px 0;
}

/* container aman meski tanpa bootstrap */
.hero-container{
  width: min(1200px, 92%);
  margin: 0 auto;
}

.hero-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 48px;
}

.hero-left{
  flex: 1 1 520px;
  max-width: 620px;
}

.hero-right{
  flex: 0 1 520px;
  display:flex;
  justify-content:flex-end; /* kunci: dorong ke kanan */
  align-items:center;
}

.hero-title{
  margin:0 0 16px 0;
  text-transform:uppercase;
  font-weight:800;
  letter-spacing:.04em;
  line-height:.92;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  color: transparent;
  -webkit-text-stroke: 2px #1e2a78;
  text-stroke: 2px #1e2a78;
}
@supports not (-webkit-text-stroke: 2px #000){
  .hero-title{ color:#1e2a78; }
}

.hero-lead{
  color:#2a2f3a;
  opacity:.9;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 24px 0;
  max-width: 38rem;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 14px;
}

.btn-hero{
  border-radius: 999px;
  padding: .9rem 1.25rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .82rem;
  text-decoration:none;

  background: #e6ffd9;
  color:#1e2a78;
  border: 1px solid rgba(30, 42, 120, .15);
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn-hero:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0,0,0,.08);
}

.btn-hero-solid{
  background:#1e2a78;
  color:#fff;
  border-color: transparent;
}

.hero-books{
  width: min(520px, 100%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.18));
}

/* Mobile: stack */
@media (max-width: 992px){
  .hero-wrap{
    flex-direction:column;
    align-items:flex-start;
  }
  .hero-right{
    width:100%;
    justify-content:center; /* tengah saat mobile */
  }
}

/* End Hero Section */

/* Featured Books Section */
.featured-books, .promo-banner, .about-us-landing, .articles-section { /* Added .articles-section */
    padding: 40px 0;
    margin-bottom: 40px;
}

.featured-books h3, .about-us-landing h3, .articles-section h3 { /* Added .articles-section h3 */
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--accent-color); /* Judul bagian berwarna hitam */
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.book-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 15px;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.book-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.book-info {
    padding: 0 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.book-title {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--accent-color); /* Judul buku berwarna hitam */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    font-size: 15px;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.book-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color); /* Harga buku berwarna merah */
    margin-bottom: 10px;
}

.book-rating {
    color: #ffc107; /* Warna bintang kuning (bisa dipertahankan atau diubah) */
    margin-bottom: 15px;
}

.book-rating .fas {
    margin-right: 2px;
}

.book-card .btn-secondary {
    width: calc(100% - 30px);
    margin-top: auto;
}


/* Promo Banner */
.promo-banner {
    background-color: var(--accent-color); /* Promo banner background hitam */
    color: var(--white-color);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.promo-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.promo-banner img {
    max-width: 400px;
    height: auto;
    margin-right: 40px;
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
}

.promo-banner .promo-content {
    max-width: 600px;
    text-align: left;
}

.promo-banner h2 {
    font-size: 38px;
    margin-bottom: 15px;
    color: var(--white-color);
}

.promo-banner p {
    font-size: 18px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* About Us Landing Section */
.about-us-landing {
    background-color: var(--bg-light); /* Light background for contrast */
    padding: 60px 0;
}

.about-us-landing .container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.about-us-landing .about-content {
    flex: 2; /* Takes more space */
    min-width: 300px;
}

.about-us-landing .about-content h3 {
    text-align: left; /* Align heading to the left */
    margin-bottom: 20px;
}

.about-us-landing .about-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-us-landing .about-image {
    flex: 1; /* Takes less space */
    min-width: 250px;
    text-align: center; /* Center image on smaller screens */
}

.about-us-landing .about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
}

/* Articles Section */
.articles-section {
    background-color: var(--white-color); /* Or var(--bg-light) for distinction */
    padding: 60px 0;
}

.articles-section h3 {
    margin-bottom: 40px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.article-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.article-card img {
    width: 100%;
    height: 200px; /* Consistent height for article images */
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.article-info {
    padding: 15px;
}

.article-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.article-date {
    font-size: 14px;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.article-excerpt {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.read-more .fas {
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.read-more:hover .fas {
    margin-left: 10px;
}

.text-center {
    text-align: center;
}


/* Footer */
.main-footer {
    background-color: var(--accent-color); /* Footer background hitam */
    color: var(--white-color);
    padding: 40px 0 20px;
    font-size: 15px;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white-color); /* Paling kontras dan mudah dibaca */
}

.footer-col p, .footer-col ul li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col ul li a:hover {
    color: var(--white-color);
    text-decoration: underline;
}

.social-icons a {
    color: var(--white-color);
    font-size: 22px;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color); /* Hover ikon sosial merah */
}

.newsletter input[type="email"] {
    width: calc(100% - 110px);
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}

.newsletter button {
    padding: 10px 20px;
    background-color: var(--primary-color); /* Tombol newsletter merah */
    color: var(--white-color);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter button:hover {
    background-color: var(--secondary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}


/* Responsive Design */
@media (max-width: 992px) {
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        align-items: center;
    }
    .main-nav ul li {
        margin: 10px 0;
    }
    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }
    .header-actions input[type="search"] {
        width: 70%;
        margin-right: 0;
    }
    .main-header .container {
        flex-direction: column;
    }
    .logo {
        margin-bottom: 100px;
    }

    .promo-banner .container, .about-us-landing .container, .articles-section .container { /* Added .articles-section .container */
        flex-direction: column;
    }
    .promo-banner img, .about-us-landing .about-image {
        margin-right: 0;
        margin-bottom: 30px;
    }
    .promo-banner .promo-content, .about-us-landing .about-content {
        text-align: center;
    }
    .about-us-landing .about-content h3 {
        text-align: center;
    }
    .articles-section .article-grid { /* Center grid items on smaller screens */
        justify-content: center;
    }


    .footer-columns {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-col {
        min-width: unset;
        width: 100%;
    }
    .social-icons {
        justify-content: center;
        display: flex;
    }
    .newsletter form {
        display: flex;
        justify-content: center;
    }
    .newsletter input[type="email"] {
        width: 70%;
    }
}

@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 38px;
    }
    .hero-section p {
        font-size: 16px;
    }
    .book-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .article-grid {
        grid-template-columns: 1fr; /* Stack articles on very small screens */
    }
    .article-card img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .main-header .container {
        padding: 0 10px;
    }
    .logo {
        font-size: 24px;
    }
    .header-actions input[type="search"] {
        width: 100%;
    }
    .book-card img {
        height: 250px;
    }
    .promo-banner h2 {
        font-size: 28px;
    }
}

/* Floating WhatsApp Button */
.wa-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 16px;
  border-radius: 999px;

  background: linear-gradient(135deg, #25D366, #1aa94f);
  color: #fff;
  text-decoration: none;

  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  transform: translateY(0);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.wa-float i{
  font-size: 22px;
  line-height: 1;
}

.wa-float .wa-text{
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2px;
}

.wa-float:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0,0,0,.22);
  color: #fff;
}

.wa-float:active{
  transform: translateY(-1px);
}

/* Mobile: cukup ikon saja agar tidak menutupi layar */
@media (max-width: 576px){
  .wa-float{
    padding: 12px;
  }
  .wa-float .wa-text{
    display: none;
  }
  .wa-float i{
    font-size: 24px;
  }
}

/* Optional: kalau ada tombol chat lain / sticky elements, biar aman */
@media (max-width: 576px){
  .wa-float{
    right: 14px;
    bottom: 14px;
  }
}