/* 
 * Desty's Pastry - Main Stylesheet
 * This file contains all common styles for the frontend website
 */

/* Base Styles */
body {
  font-family: 'Nunito', sans-serif;
  padding-top: 80px;
}

/* Typography */
.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 600;
}

.section-title,
.profile-title,
.product-title,
.login-title,
.register-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

/* Buttons */
.btn-primary, 
.btn-submit,
.btn-login,
.btn-register {
  background-color: #bb613b;
  border-color: #bb613b;
  color: white;
  font-weight: 600;
}

.btn-primary:hover, 
.btn-submit:hover,
.btn-login:hover,
.btn-register:hover {
  background-color: #a5542f;
  border-color: #a5542f;
  color: white;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-shop {
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  background-color: #bb613b;
  color: white;
  border: none;
  font-weight: 600;
}

.btn-shop:hover {
  background-color: #a5542f;
  color: white;
}

.btn-buy {
  background-color: #bb613b;
  color: white;
}

.btn-cart {
  background-color: white;
  color: #bb613b;
  border: 1px solid #bb613b;
}

.btn-buy:hover {
  background-color: #a5542f;
  color: white;
}

.btn-cart:hover {
  background-color: #f8f9fa;
  color: #a5542f;
}

.card-buttons {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Hero Section */
.hero {
  background: url('../background-2.png') 85% center/contain no-repeat;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  position: relative;
}

.hero-content {
  z-index: 2;
  text-align: left;
  padding-left: 10%;
  margin-right: auto;
  width: 50%;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* Product Cards */
.product-grid {
  padding: 40px 0;
}

.product-card {
  border: none;
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
  height: 250px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-weight: 700;
  margin-top: 0.5rem;
}

.card-text {
  height: 60px;
  overflow-y: auto;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #bb613b #f8f9fa;
}

.card-text::-webkit-scrollbar {
  width: 6px;
}

.card-text::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 10px;
}

.card-text::-webkit-scrollbar-thumb {
  background-color: #bb613b;
  border-radius: 10px;
}

.card-text:hover {
  cursor: pointer;
}

.card-price {
  font-weight: bold;
  margin-top: auto;
  margin-bottom: 15px;
}

/* Search Bar */
.search-bar {
  margin-top: 40px;
}

/* Alerts and Messages */
.alert-popup {
  position: fixed;
  top: 85px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  min-width: 300px;
  max-width: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.alert-popup .btn-close {
  padding: 0.5rem 0.5rem;
}

/* Product Status (Sold Out) */
.sold-out-badge {
  background-color: #dc3545;
  color: white;
  padding: 5px 15px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  margin-top: 10px;
}

.card-img-wrapper {
  position: relative;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;
}

.card-overlay span {
  background-color: #dc3545;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.product-card.sold-out {
  opacity: 0.85;
}

/* Product Detail Page */
.product-image {
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

.product-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-top: 20px;
  margin-bottom: 20px;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #bb613b;
  margin-bottom: 20px;
}

.product-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.product-details {
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.product-meta {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #666;
  text-decoration: none;
}

.back-link:hover {
  color: #bb613b;
}

.related-products {
  margin-top: 50px;
}

.related-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.product-image-wrapper {
  position: relative;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.image-overlay span {
  background-color: #dc3545;
  color: white;
  padding: 10px 25px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
}

/* Profile Page */
.profile-container {
  max-width: 800px;
  margin: 60px auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 30px;
  display: block;
  border: 5px solid #f8f9fa;
}

.profile-image-container {
  text-align: center;
  margin-bottom: 30px;
}

.profile-image-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: none;
  margin: 10px auto;
  border: 3px solid #f8f9fa;
}

/* Login/Register Forms */
.login-container,
.register-container {
  max-width: 500px;
  margin: 60px auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.login-title,
.register-title {
  margin-bottom: 20px;
}

.btn-login,
.btn-register {
  width: 100%;
}

.form-text {
  text-align: center;
  margin-top: 15px;
}

.form-text a {
  color: #bb613b;
  text-decoration: none;
}

/* WhatsApp Button */
.whatsapp-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  border-radius: 50px;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
}

.whatsapp-button i {
  font-size: 1.8rem;
}

.whatsapp-button:hover {
  background-color: #128C7E;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Shopping Cart */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #343a40;
  text-decoration: none;
  transition: color 0.2s;
}

.cart-icon i {
  font-size: 1.5rem;
}

.cart-icon:hover {
  color: #bb613b;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #bb613b;
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    background-position: right center;
  }
  
  .hero-content {
    width: 80%;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .whatsapp-button {
    bottom: 25px;
    right: 25px;
    padding: 16px;
    border-radius: 50%;
  }
  
  .whatsapp-button span {
    display: none;
  }
  
  .whatsapp-button i {
    font-size: 2.2rem;
    margin: 0;
  }
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 1060;
  max-width: 350px;
}

.cart-notification .alert {
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-left: 4px solid;
}

.cart-notification .alert-success {
  border-left-color: #198754;
}

.cart-notification .alert-danger {
  border-left-color: #dc3545;
}

.cart-notification .alert-warning {
  border-left-color: #ffc107;
} 