/* 
  Blessing Today Resources - Design System & Stylesheet
  Inspired by blessingtoday.tv Layout & Color System
*/

:root {
  /* Colors */
  --primary-orange: #d65005;
  --primary-orange-hover: #b84302;
  --dark-bg: #1a1b1b;
  --black-bar: #0c0d0d;
  --light-gray-bg: #ecf0f1;
  --white-bg: #ffffff;
  --text-dark: #222222;
  --text-muted: #666666;
  --border-color: #e2e8f0;
  
  /* Fonts */
  --font-headers: 'Raleway', sans-serif;
  --font-anton: 'Anton', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-details: 'Lato', sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--white-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-headers);
  font-weight: 700;
  letter-spacing: -0.5px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

/* Utilities */
.hidden {
  display: none !important;
}

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

.text-orange {
  color: var(--primary-orange) !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-headers);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--primary-orange);
  color: var(--white-bg);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-orange-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

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

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

.btn-link {
  background: none;
  border: none;
  color: var(--primary-orange);
  padding: 0;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.btn-link:hover {
  color: var(--primary-orange-hover);
  text-decoration: underline;
}

/* 1. Header Styles */
#main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white-bg);
  box-shadow: var(--shadow-soft);
}

#top-bar {
  background-color: var(--black-bar);
  color: #a0aec0;
  font-size: 0.75rem;
  padding: 8px 0;
  font-family: var(--font-details);
  letter-spacing: 0.5px;
}

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

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #2d3748;
  color: #fff;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.social-links a:hover {
  background-color: var(--primary-orange);
  transform: scale(1.1);
}

#nav-container {
  padding: 15px 0;
}

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

#logo-area {
  flex-shrink: 0;
}

#header-logo {
  height: 48px;
  display: block;
}

#nav-links ul {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-item {
  font-family: var(--font-headers);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav-item:hover, .nav-item.active {
  color: var(--primary-orange);
}

.nav-item.active {
  border-bottom-color: var(--primary-orange);
}

#give-btn a {
  background-color: var(--primary-orange);
  color: var(--white-bg);
  padding: 8px 20px;
  border-radius: 4px;
  border-bottom: none;
}

#give-btn a:hover {
  background-color: var(--primary-orange-hover);
  color: var(--white-bg);
}

/* Cart Button */
#cart-trigger {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-dark);
  cursor: pointer;
  position: relative;
  padding: 5px;
  transition: var(--transition-smooth);
}

#cart-trigger:hover {
  color: var(--primary-orange);
  transform: scale(1.05);
}

#cart-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: var(--primary-orange);
  color: var(--white-bg);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-details);
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white-bg);
}

#mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* 2. Hero Section */
#hero-welcome {
  width: 100%;
  overflow: hidden;
  background-color: var(--white-bg);
}

#hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 3. Main Storefront Layout */
#storefront {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 60px 20px;
}

/* Filters Sidebar */
#filter-sidebar {
  background-color: var(--white-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px 20px;
  height: fit-content;
  position: sticky;
  top: 120px;
  box-shadow: var(--shadow-soft);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.sidebar-header h2 {
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dark);
}

.filter-group {
  margin-bottom: 30px;
}

.filter-group label {
  display: block;
  font-family: var(--font-headers);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.search-wrapper {
  position: relative;
}

#search-input {
  width: 100%;
  padding: 10px 35px 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-orange);
}

.search-wrapper i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-details);
}

.custom-checkbox input {
  display: none;
}

.checkbox-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 3px;
  display: inline-block;
  position: relative;
  transition: var(--transition-smooth);
}

.custom-checkbox input:checked + .checkbox-indicator {
  background-color: var(--primary-orange);
  border-color: var(--primary-orange);
}

.custom-checkbox input:checked + .checkbox-indicator::after {
  content: '\f00c';
  font-family: 'FontAwesome';
  color: white;
  font-size: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#category-select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background-color: var(--white-bg);
}

#price-range {
  width: 100%;
  accent-color: var(--primary-orange);
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Sidebar Gift Banner */
.sidebar-banner {
  margin-top: 20px;
  background-color: var(--dark-bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.banner-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  opacity: 0.65;
}

.banner-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  text-align: center;
  color: var(--white-bg);
  z-index: 5;
}

.banner-content h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.banner-content p {
  font-size: 0.75rem;
  color: var(--light-gray-bg);
  margin-bottom: 10px;
}

.banner-content .btn {
  padding: 6px 16px;
  font-size: 0.7rem;
}

/* Products Feed */
#products-feed {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

#results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

#sort-select {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-body);
}

/* Products Grid */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

/* Spinner */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 15px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(214, 80, 5, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-orange);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Product Card Styling */
.product-card {
  background-color: var(--white-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

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

.card-img-wrapper {
  background-color: #f7fafc;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  position: relative;
  overflow: hidden;
}

.card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: var(--transition-smooth);
}

.product-card:hover .card-img {
  transform: scale(1.03);
}

.tag-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--dark-bg);
  color: var(--white-bg);
  font-family: var(--font-headers);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
}

.tag-badge.lang-badge {
  left: auto;
  right: 12px;
  background-color: var(--primary-orange);
}

.card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-size: 0.75rem;
  color: var(--primary-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-details);
  margin-bottom: 12px;
}

.card-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 58px;
}

.card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-bottom: 5px;
}

.price-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.add-to-cart-btn {
  padding: 10px;
  font-size: 0.75rem;
}

.amazon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: #f0c14b;
  border: 1px solid #a88734;
  border-radius: 4px;
  color: #111;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.amazon-btn:hover {
  background-color: #ddb347;
}

/* No Results State */
.no-results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
}

.no-results-container i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.no-results-container h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.no-results-container p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* E-commerce cart and checkout modal styles removed - books link directly to Amazon */

/* 6. Connect Bar CTA */
#connect-cta-bar {
  background-color: var(--light-gray-bg);
  padding: 60px 0;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.cta-card {
  background-color: var(--white-bg);
  border-radius: 8px;
  padding: 40px 25px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.cta-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.cta-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(214, 80, 5, 0.08);
  color: var(--primary-orange);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}

.cta-card:hover .cta-icon {
  background-color: var(--primary-orange);
  color: var(--white-bg);
}

.cta-card h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.cta-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* 7. Footer Styles */
#main-footer {
  background-color: var(--dark-bg);
  color: #cbd5e0;
  padding: 80px 0 0 0;
  font-family: var(--font-details);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  border-bottom: 1px solid #2d3748;
  padding-bottom: 50px;
}

.footer-col h4 {
  font-family: var(--font-headers);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white-bg);
  margin-bottom: 25px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul a {
  font-size: 0.85rem;
}

.footer-col ul a:hover {
  color: var(--primary-orange);
  padding-left: 3px;
}

.contact-line {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-line i {
  color: var(--primary-orange);
}

.office-address {
  margin-top: 15px;
  font-size: 0.75rem;
  color: #a0aec0;
  line-height: 1.5;
}

#footer-bottom {
  background-color: var(--black-bar);
  padding: 25px 0;
  font-size: 0.75rem;
  color: #718096;
}

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

.footer-bottom-content a:hover {
  color: var(--white-bg);
}

.powered-by {
  font-size: 0.7rem;
}

.snappages-txt {
  font-weight: 700;
  color: #a0aec0;
}

/* Responsive Adjustments */
@media screen and (max-width: 1024px) {
  #storefront {
    grid-template-columns: 1fr;
  }
  
  #filter-sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  #mobile-menu-toggle {
    display: block;
  }
  
  #nav-links {
    display: none; /* Add menu mobile overlay logic in production */
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .cta-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .payment-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
