/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --primary: #4a6fa5;
  --secondary: #6b8cbc;
  --accent: #e63946;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --book-bg: #f8f5f0;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  text-align: center;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-accent {
  background: var(--accent);
}

.btn-accent:hover {
  background: #c1121f;
}

/* Header */
header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary);
  color: white;
  padding: 8px 0;
  font-size: 0.9rem;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header {
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  padding: 5px 0;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

.header-icons {
  display: flex;
  align-items: center;
}

.header-icons a {
  margin-left: 20px;
  color: var(--dark);
  font-size: 1.3rem;
  position: relative;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 70vh;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

/* Sections */
.section-title {
  text-align: center;
  margin: 50px 0 30px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent);
}

/* Books Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.book-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.book-img {
  height: 280px;
  background: var(--book-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.book-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.book-info {
  padding: 20px;
}

.book-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.book-author {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.book-rating {
  color: #ffc107;
  margin: 10px 0;
}

.book-price {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--accent);
  margin: 10px 0;
}

/* Product Page */
.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 50px 0;
}

.product-images .main-image {
  background: var(--book-bg);
  height: 400px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-details h1 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.product-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* Cart Page */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cart-table th {
  background: var(--primary);
  color: white;
  text-align: left;
  padding: 15px;
}

.cart-table td {
  padding: 15px;
  border-bottom: 1px solid var(--light-gray);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-item img {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.quantity-input {
  width: 60px;
  padding: 8px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  text-align: center;
}

.cart-summary {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  margin-left: auto;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.summary-total {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
}

/* About & Contact */
.page-content {
  padding: 50px 0;
}

.page-content h1 {
  margin-bottom: 25px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.content-image {
  background: var(--book-bg);
  height: 400px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary);
}

.contact-info h3 {
  margin-bottom: 20px;
}

.contact-detail {
  display: flex;
  margin-bottom: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  margin-right: 15px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
}

.contact-form textarea {
  height: 150px;
  resize: vertical;
}

/* FAQ */
.faq-item {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.faq-item h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 60px 0 20px;
}

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

.footer-col h3 {
  color: white;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #adb5bd;
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: white;
  padding-left: 5px;
}

.social-links {
  display: flex;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  margin-right: 10px;
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #adb5bd;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
  .product-container,
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .cart-summary {
    max-width: 100%;
    margin: 30px 0 0;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    box-shadow: var(--shadow);
    padding: 15px 0;
  }
  
  nav ul.show {
    display: flex;
  }
  
  nav ul li {
    margin: 10px 0 10px 25px;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .hero {
    height: 60vh;
  }
  
  .books-grid {
    grid-template-columns: 1fr;
  }
}