/* ============================================
   Shaloe's Bike Hub - Main Stylesheet
   Version: 1.0
   Author: Radical Tech
   Description: Complete styles for bike parts eCommerce website
   Includes: Glassmorphism, Responsive Design, Animations
============================================ */

/* ============================================
   IMPORT FONTS & BASE
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   CSS VARIABLES (THEME)
============================================ */
:root {
  --primary: #d35400;
  --primary-dark: #a04000;
  --primary-light: #e67e22;
  --secondary: #1e2a3a;
  --secondary-dark: #0f1724;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;
  --light: #f4f7fc;
  --dark: #1e2a3a;
  --gray: #666;
  --light-gray: #e0e0e0;
  --white: #ffffff;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 25px 45px rgba(0, 0, 0, 0.2);
  --border-radius: 20px;
  --border-radius-sm: 10px;
  --transition: all 0.3s ease;
}

/* ============================================
   RESET & GLOBAL STYLES
============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ============================================
   CONTAINER & LAYOUT
============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--dark);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 0.5rem auto 0;
  border-radius: 3px;
}

/* ============================================
   NAVBAR (STICKY + GLASS)
============================================ */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo img {
  height: 50px;
  width: auto;
}

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 400px;
  display: flex;
  margin: 0 1rem;
}

.search-bar input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: 50px 0 0 50px;
  outline: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--primary);
}

.search-bar button {
  background: var(--primary);
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 0 50px 50px 0;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background: var(--primary-dark);
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(211, 84, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211, 84, 0, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-whatsapp {
  background: #25D366;
  color: white;
}

.btn-whatsapp:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

.btn-email {
  background: var(--info);
  color: white;
}

.btn-email:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

/* ============================================
   PRODUCT CARDS
============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--light-gray);
  transition: transform 0.5s;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.2rem;
}

.card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.5rem 0;
}

.category {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.category i {
  margin-right: 0.3rem;
}

.quick-view-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  width: 100%;
  margin-top: 0.5rem;
}

.quick-view-btn:hover {
  background: var(--primary-dark);
}

/* ============================================
   CATEGORY CARDS
============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.category-card {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--dark);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.category-card i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.category-card h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-gray);
  background: white;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}

.page-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================
   LOADING SPINNER & SKELETON
============================================ */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.skeleton {
  background: linear-gradient(90deg, var(--light-gray) 25%, #f0f0f0 50%, var(--light-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 300px;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.skeleton-img {
  height: 200px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 60px;
  margin: 1rem;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}

/* ============================================
   WHATSAPP FLOATING BUTTON
============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: var(--transition);
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.whatsapp-float a {
  color: white;
}

/* ============================================
   FOOTER
============================================ */
footer {
  background: var(--secondary);
  color: white;
  text-align: center;
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content img {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.social-icons a {
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-icons a:hover {
  color: var(--primary-light);
  transform: translateY(-3px);
}

/* ============================================
   PRODUCT PAGE SPECIFIC
============================================ */
.product-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.product-gallery {
  position: relative;
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.thumbnail-grid {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail.active {
  border-color: var(--primary);
}

.thumbnail:hover {
  transform: scale(1.05);
}

.product-info h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
  margin: 1rem 0;
}

.product-category {
  display: inline-block;
  background: var(--light);
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
}

.rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.stars {
  color: var(--warning);
}

.compatibility-list {
  background: var(--light);
  padding: 1rem;
  border-radius: 15px;
  margin: 1rem 0;
}

.compatibility-tag {
  display: inline-block;
  background: white;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  margin: 0.3rem;
  font-size: 0.85rem;
  border: 1px solid var(--light-gray);
}

.inquiry-buttons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

/* ============================================
   REVIEWS SECTION
============================================ */
.reviews-section {
  grid-column: 1 / -1;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--light-gray);
}

.review-card {
  background: var(--light);
  padding: 1rem;
  border-radius: 15px;
  margin-bottom: 1rem;
}

.review-form {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

.review-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  margin: 0.5rem 0;
  resize: vertical;
}

.star-rating {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.star-rating i {
  font-size: 1.5rem;
  cursor: pointer;
  color: #ddd;
  transition: var(--transition);
}

.star-rating i.active,
.star-rating i:hover {
  color: var(--warning);
}

/* ============================================
   LIGHTBOX
============================================ */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* ============================================
   TOAST NOTIFICATIONS
============================================ */
.toast {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--dark);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  z-index: 1000;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   NO RESULTS & EMPTY STATES
============================================ */
.no-results {
  text-align: center;
  padding: 3rem;
}

.no-results i {
  font-size: 4rem;
  color: var(--light-gray);
  margin-bottom: 1rem;
}

.no-results h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--gray);
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 992px) {
  .product-container {
    grid-template-columns: 1fr;
  }
  
  .product-gallery {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
  }
  
  .search-bar {
    max-width: 100%;
    margin: 0;
    width: 100%;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .mobile-menu {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
  }
  
  .category-card {
    padding: 1rem;
  }
  
  .category-card i {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .inquiry-buttons {
    flex-direction: column;
  }
  
  .inquiry-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .main-image {
    height: 300px;
  }
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
  .navbar,
  .whatsapp-float,
  footer,
  .inquiry-buttons,
  .review-form {
    display: none;
  }
  
  body {
    background: white;
  }
  
  .product-container {
    display: block;
  }
  
  .card {
    break-inside: avoid;
  }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease;
}

/* ============================================
   SCROLLBAR STYLING
============================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}