/* Literary Haven - CSS Styles */

/* CSS Variables */
:root {
  /* Colors from brief */
  --accent-primary: #af1ea8;
  --accent-secondary: #f63bc7;
  --accent-purple: #af63f1;
  --accent-violet: #8b5cf6;
  --bg-light: #e9e9e9;
  --bg-card-light: #dbeafe;
  --bg-white: #fff;
  --bg-dark: #1f2937;
  --text-dark: #111827;
  --text-light: #6b7280;
  --text-white: #ffffff;
  
  /* Gradients from the design */
  --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --gradient-purple: linear-gradient(135deg, var(--accent-purple), var(--accent-violet));
  
  /* Typography */
  --font-family: "Nunito", sans-serif;
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  
  /* Spacing */
  --border-radius: 16px;
  --border-radius-lg: 20px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2.5rem;
  color: var(--accent-primary);
}

h3 {
  font-size: 2rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Buttons */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: var(--text-white);
  padding: 12px 32px;
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text-white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  padding: 12px 32px;
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-size: 1rem;
}

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

/* Cards */
.card-custom {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: none;
  overflow: hidden;
}

.card-custom:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.card-light {
  background: var(--bg-card-light);
}

/* Header */
.header {
  background: var(--bg-dark);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  color: var(--text-white);
  font-weight: var(--font-weight-normal);
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-secondary);
}

.cart-icon {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gradient-primary);
  color: var(--text-white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(0, 0, 0, 0.7)), url('./img/hero-bg.webp');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--text-white);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  opacity: 0.1;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: var(--text-white);
  background: none;
  -webkit-text-fill-color: var(--text-white);
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Headers */
.section-header {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 10rem 0;
  text-align: center;
}

.section-header h1 {
  color: var(--text-white);
  background: none;
  -webkit-text-fill-color: var(--text-white);
}

/* Product Cards */
.product-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
}

.product-card-body {
  padding: 1.5rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent-primary);
  margin: 0.5rem 0;
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-item {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-purple);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--text-white);
  font-size: 2rem;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--accent-secondary);
  margin-bottom: 1rem;
}

.footer a {
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-secondary);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  padding: 1rem;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.cookie-banner.show {
  display: block;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1050;
}

.toast-custom {
  background: var(--gradient-primary);
  color: var(--text-white);
  border: none;
  border-radius: var(--border-radius);
}

/* Form Styles */
.form-control {
  border: 2px solid #e5e7eb;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(175, 30, 168, 0.1);
}

/* Cart Styles */
.cart-item {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-primary);
  background: transparent;
  color: var(--accent-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background: var(--accent-primary);
  color: var(--text-white);
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .btn-primary,
  .btn-outline {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
  
  .card-custom {
    padding: 1.5rem;
  }
  
  .product-card img {
    height: 200px;
  }
}

/* Utility Classes */
.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-purple {
  background: var(--gradient-purple);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-padding {
  padding: 4rem 0;
}

.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-white), var(--bg-white)) padding-box,
              var(--gradient-primary) border-box;
  border-radius: var(--border-radius);
}
