/* Pan Mallette Coffee - Main Styles */
:root {
  --coffee-brown: #6B4F37;
  --creamy-beige: #F7EFE6;
  --rich-gold: #CBA052;
  --charcoal: #2C2C2C;
  --white: #FFFFFF;
  --light-brown: #8B6F47;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Arial', 'Microsoft JhengHei', sans-serif;
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--creamy-beige);
}

/* Header */
header {
  background: var(--white);
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 2rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  justify-self: start;
}

nav {
  justify-self: center;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.logo {
  height: 60px;
  width: auto;
}

/* Brand Container and Text */
.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  justify-self: start;
}

.brand-text {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a365d;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(26, 54, 93, 0.1);
  transition: color 0.3s ease;
}

.brand-container:hover .brand-text {
  color: #2c5282;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

nav a {
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

nav a:hover,
nav a.active {
  color: var(--coffee-brown);
}

.language-toggle {
  background: var(--rich-gold);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-toggle:hover {
  background: var(--coffee-brown);
}

.mobile-menu-toggle {
  display: none;
  background: var(--coffee-brown);
  color: var(--white);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--creamy-beige), var(--white));
  border-radius: 15px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  color: var(--coffee-brown);
  margin-bottom: 1rem;
  font-weight: bold;
}

.hero p {
  font-size: 1.2rem;
  color: var(--charcoal);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-block;
  background: var(--coffee-brown);
  color: var(--white);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0.5rem;
}

.cta-button:hover {
  background: var(--light-brown);
  transform: translateY(-2px);
}

/* Shop Images */
.shop-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

.shop-image {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
  height: 400px;
}

.shop-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.3s ease;
  display: block;
  min-height: 400px;
}

.shop-image:hover img {
  transform: scale(1.05);
}

.placeholder-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--coffee-brown), var(--light-brown));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-align: center;
  padding: 2rem;
}

.placeholder-image h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.placeholder-image p {
  opacity: 0.8;
}

.placeholder-video {
  width: 100%;
  height: 400px;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.placeholder-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--white);
  padding: 1.5rem;
  text-align: center;
}

.video-overlay h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.video-overlay p {
  opacity: 0.9;
  font-size: 0.9rem;
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.video-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: var(--charcoal);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 2001;
}

.modal-close:hover {
  background: var(--coffee-brown);
}

.placeholder-video {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.placeholder-video:hover {
  transform: scale(1.02);
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.info-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow);
  text-align: center;
}

.info-card h3 {
  color: var(--coffee-brown);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.info-card p {
  margin-bottom: 1rem;
}

.info-card .highlight {
  color: var(--rich-gold);
  font-weight: bold;
}

/* Contact Info */
.contact-info {
  background: linear-gradient(135deg, var(--coffee-brown), var(--light-brown));
  color: var(--white);
  padding: 3rem 2rem;
  border-radius: 20px;
  margin: 3rem 0;
  text-align: center;
  box-shadow: 0 15px 35px var(--shadow);
}

.contact-info h2 {
  margin-bottom: 2rem;
  color: var(--rich-gold);
  font-size: 2rem;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.contact-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--rich-gold);
  display: block;
}

.contact-item strong {
  color: var(--rich-gold);
  display: block;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-item span {
  font-size: 1rem;
  line-height: 1.5;
  display: block;
}

.contact-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-action-btn {
  background: var(--rich-gold);
  color: var(--coffee-brown);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-action-btn:hover {
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.contact-action-btn .btn-icon {
  font-size: 1.2rem;
}

/* Forms */
.form-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow);
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--coffee-brown);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--creamy-beige);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--coffee-brown);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-button {
  background: var(--coffee-brown);
  color: var(--white);
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background: var(--light-brown);
}

/* Coming Soon */
.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow);
}

.coming-soon h1 {
  color: var(--coffee-brown);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.coming-soon p {
  font-size: 1.2rem;
  color: var(--charcoal);
}

/* Footer */
footer {
  background: var(--charcoal);
  color: var(--white);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

footer p {
  margin-bottom: 1rem;
}

footer a {
  color: var(--rich-gold);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Products Page Styles */
.hero-section {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--coffee-brown), var(--light-brown));
  color: var(--white);
  margin-bottom: 3rem;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.hero-section p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Product Filters */
.product-filters {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
}

.filter-section {
  margin-bottom: 2rem;
  text-align: center;
}

.filter-section:last-child {
  margin-bottom: 3rem;
}

.filter-section h3 {
  margin: 0 0 1.5rem 0;
  color: var(--coffee-brown);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

.filter-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--rich-gold);
  border-radius: 1px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.filter-btn, .price-filter-btn {
  background: transparent;
  color: var(--coffee-brown);
  border: 1.5px solid rgba(107, 79, 55, 0.3);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
}

.filter-btn::before, .price-filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(203, 160, 82, 0.2), transparent);
  transition: left 0.5s ease;
}

.filter-btn:hover::before, .price-filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover, .price-filter-btn:hover {
  background: rgba(107, 79, 55, 0.1);
  border-color: var(--coffee-brown);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(107, 79, 55, 0.15);
}

.filter-btn.active, .price-filter-btn.active {
  background: var(--coffee-brown);
  color: var(--white);
  border-color: var(--coffee-brown);
  box-shadow: 0 5px 15px rgba(107, 79, 55, 0.3);
}

/* Best Selling Badge */
.best-selling-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(45deg, #ff6b35, #ff8e53);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
  z-index: 10;
}

/* Products Grid */
.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.product-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
  background: var(--creamy-beige);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.product-info {
  padding: 1.5rem;
}

.product-name {
  color: var(--coffee-brown);
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.product-description {
  color: var(--charcoal);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--rich-gold);
  margin-bottom: 1rem;
}

.product-cta {
  display: inline-block;
  width: 100%;
  background: var(--coffee-brown);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.product-cta:hover {
  background: var(--light-brown);
  color: var(--white);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Loading and No Products Messages */
.loading-message,
.no-products-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--charcoal);
}

.loading-message p,
.no-products-message p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.no-products-message .cta-button {
  margin: 0 0.5rem;
}

.no-products-buttons {
  margin-top: 2rem;
  text-align: center;
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--coffee-brown);
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover {
  color: var(--rich-gold);
}

.modal-product-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 15px 15px 0 0;
  background: var(--creamy-beige);
  cursor: zoom-in;
}

.modal-product-image:hover {
  opacity: 0.9;
}

/* Full-screen image viewer */
.image-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  cursor: zoom-out;
}

.image-fullscreen-overlay img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.image-fullscreen-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.image-fullscreen-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-product-info {
  padding: 2rem;
}

.modal-product-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--coffee-brown);
  margin-bottom: 1rem;
}

.modal-product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--rich-gold);
  margin-bottom: 1rem;
}

.modal-product-category {
  display: inline-block;
  background: var(--creamy-beige);
  color: var(--coffee-brown);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.modal-product-description {
  color: var(--charcoal);
  line-height: 1.6;
  margin-bottom: 2rem;
  white-space: pre-line; /* This preserves line breaks */
}

.modal-product-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Notification Toast Styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  background: var(--white);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--rich-gold);
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left-color: #28a745;
}

.notification.error {
  border-left-color: #dc3545;
}

.notification-icon {
  font-size: 1.5rem;
}

.notification.success .notification-icon {
  color: #28a745;
}

.notification.error .notification-icon {
  color: #dc3545;
}

.notification-text {
  flex: 1;
  color: var(--charcoal);
  font-weight: 500;
}

.notification-close {
  cursor: pointer;
  color: var(--light-brown);
  font-weight: bold;
  font-size: 1.2rem;
}

.notification-close:hover {
  color: var(--coffee-brown);
}

/* Responsive Design for Products */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .product-filters {
    margin: 2rem auto 1.5rem;
    padding: 0 1rem;
  }
  
  .filter-section {
    margin-bottom: 1.5rem;
  }
  
  .filter-section:last-child {
    margin-bottom: 2rem;
  }
  
  .filter-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .filter-buttons {
    gap: 0.75rem;
  }
  
  .filter-btn, .price-filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .product-image {
    height: 240px;
  }
  
  .product-info {
    padding: 1rem;
  }
  
  .product-name {
    font-size: 1.1rem;
  }
  
  .product-price {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 3rem 1rem;
  }
  
  .product-filters {
    margin: 1.5rem auto 1rem;
  }
  
  .filter-section h3 {
    font-size: 1rem;
  }
  
  .filter-buttons {
    gap: 0.5rem;
  }
  
  .filter-btn, .price-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.margin-bottom {
  margin-bottom: 2rem;
}

.gold-text {
  color: var(--rich-gold);
}

.coffee-text {
  color: var(--coffee-brown);
}

/* Hidden class for translation */
.hidden {
  display: none !important;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  background: var(--creamy-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coffee-brown);
  font-weight: 500;
}

.btn-edit {
  background: #1a365d;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-edit:hover {
  background: #274472;
}

.btn-delete {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-delete:hover {
  background: #c0392b;
}

.btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

