/* style.css - Premium Re-design for BuyParts */

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #1f2833;
  --bg-darker: #050608;
  --text-primary: #f5f5f7;
  --text-secondary: #c5a880;
  --text-body: #c8cbd0;
  --accent-color: #ffb703;
  --accent-hover: #fb8500;
  --accent-glow: rgba(255, 183, 3, 0.3);
  --glass-bg: rgba(31, 40, 51, 0.55);
  --glass-border: rgba(255, 255, 255, 0.06);
  --card-bg: #151b24;
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background image overlay applied gracefully */
.main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(rgba(11, 12, 16, 0.92), rgba(11, 12, 16, 0.97)), url('images/BuyPartsBG4.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Typography styling */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

/* HEADER & NAVIGATION */
.header-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-menu a {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.8px;
  padding: 6px 12px;
  position: relative;
  opacity: 0.85;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-color);
  opacity: 1;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 15px;
}

.google-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.google-button:hover {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
}

.cart-icon-link {
  position: relative;
  font-size: 20px;
  color: var(--text-primary);
  padding: 5px;
}

.cart-icon-link:hover {
  color: var(--accent-color);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-color);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

.mobile-toggle {
  display: none;
  font-size: 22px;
}

.glowing-accent-line {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

/* MAIN CONTENT SPACING */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

/* HERO SLIDESHOW */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 480px;
  margin: 0 auto 50px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
}

.mySlides {
  display: none;
  height: 100%;
  position: relative;
}

.mySlides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(11, 12, 16, 0.95), transparent);
  padding: 40px 30px;
  text-align: center;
}

.slide-title {
  color: var(--accent-color);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: #fff;
  font-weight: bold;
  font-size: 24px;
  transition: var(--transition-smooth);
  border-radius: 5px;
  user-select: none;
  background-color: rgba(11, 12, 16, 0.5);
  border: 1px solid var(--glass-border);
}

.next {
  right: 15px;
}

.prev {
  left: 15px;
}

.prev:hover, .next:hover {
  background-color: var(--accent-color);
  color: var(--bg-primary);
}

.dots-indicator-container {
  text-align: center;
  margin-top: -30px;
  position: relative;
  z-index: 10;
  margin-bottom: 50px;
}

.dot {
  cursor: pointer;
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: inline-block;
  transition: var(--transition-smooth);
}

.dot.active, .dot:hover {
  background-color: var(--accent-color);
  transform: scale(1.2);
}

/* SECTION HEADING */
.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-block;
}

.section-header .divider {
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 10px auto 0 auto;
  border-radius: 2px;
}

/* PRODUCT GRID & CARDS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  width: 100%;
}

.product-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(255, 183, 3, 0.08);
  border-color: rgba(255, 183, 3, 0.3);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: var(--bg-darker);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  border: none;
  border-radius: 0;
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.08);
}

.product-info {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.product-desc {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 20px;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-color);
}

.buy-btn {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.buy-btn:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* CART & CHECKOUT PAGES */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-items-panel {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 30px;
  border: 1px solid var(--glass-border);
}

.cart-card-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}

.cart-card-item:last-child {
  border-bottom: none;
}

.cart-card-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
}

.cart-card-details {
  flex: 1;
}

.cart-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.cart-card-price {
  color: var(--accent-color);
  font-weight: 600;
}

.cart-card-action a {
  color: #ff3333;
  font-size: 14px;
}

.cart-card-action a:hover {
  color: #ff6666;
  text-decoration: underline;
}

.cart-summary-panel {
  background-color: var(--glass-bg);
  border-radius: 10px;
  padding: 30px;
  border: 1px solid var(--glass-border);
  height: fit-content;
}

.cart-summary-panel h3 {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 16px;
}

.summary-row.total {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: 15px;
}

.checkout-form {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group input {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
}

.checkout-btn {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  border: none;
  padding: 12px;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  margin-top: 15px;
}

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

/* ABOUT PAGE / CONTACT */
.about-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.about-text {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 30px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .about-features {
    grid-template-columns: 1fr;
  }
}

.feature-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px;
  border-radius: 8px;
}

.feature-box h4 {
  color: var(--accent-color);
  margin-bottom: 8px;
}

/* USER PROFILE DETAILS IN HEADER */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.nav-username {
  font-size: 13px;
  font-weight: 500;
}

.logout-link {
  color: var(--text-secondary);
  font-size: 14px;
}

.logout-link:hover {
  color: #ff3333;
}

/* CATEGORY QUICK LINKS (HOME PAGE) */
.category-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}

@media (max-width: 768px) {
  .category-showcase {
    grid-template-columns: 1fr;
  }
}

.category-banner {
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--glass-border);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.category-banner:hover img {
  transform: scale(1.05);
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(11, 12, 16, 0.9), rgba(11, 12, 16, 0.3));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.category-overlay h3 {
  font-size: 24px;
  color: #fff;
  margin-bottom: 5px;
}

.category-overlay span {
  font-size: 13px;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
}

/* FOOTER */
.footer-area {
  background-color: var(--bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 20px 30px 20px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 15px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.social-icons a:hover {
  background-color: var(--accent-color);
  color: var(--bg-primary);
}

.footer-links h3, .footer-info h3 {
  font-size: 16px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

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

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

.footer-links ul li {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-links ul li a {
  color: var(--text-secondary);
}

.footer-links ul li a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-info p i {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* CUSTOM BEAUTIFUL TOAST */
.custom-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1e1e1e;
  border-left: 4px solid var(--accent-color);
  color: #fff;
  padding: 16px 24px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-toast.error {
  border-left-color: #ff3333;
}

.custom-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* RESPONSIVE DESIGN ADJUSTMENTS */
@media screen and (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
    cursor: pointer;
  }
  
  .nav-menu.responsive {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    padding: 20px;
    border-bottom: 2px solid var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    gap: 15px;
    align-items: stretch;
  }
  
  .nav-menu.responsive .nav-right {
    margin-left: 0;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
  }
}