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

body {
  background: #57070A !important;
  color: #f0d9b5;
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* Header */
header {
  text-align: center;
  padding: 25px 15px 20px;
  background: #57070A !important;
}

.logo {
  width: 200px;
  max-width: 100%;
  height: auto;
  margin-bottom: 8px;
}

header h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f0d9b5;
  letter-spacing: 2px;
}

/* Layout */
.container {
  padding: 15px;
  max-width: 1400px;
  margin: auto;
}

#catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  padding-bottom: 40px;
}

/* Catalog Item */
.item {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin-bottom: 25px; 
}

.image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* 9:16 */
  background: #f0f0f0;
}

.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info {
  padding: 16px;
  text-align: center;
  color: #333;
}

.code {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.code strong {
  color: #57070A;
  font-size: 1.7rem;
}

.qty,
.total-available {
  font-weight: bold;
  color: #57070A;
  background: #ffefc9;
  border-radius: 25px;
  display: inline-block;
}

.qty {
  font-size: 25px;
  padding: 7px 18px;
}

.total-available {
  font-size: 1rem !important;
  padding: 12px 25px;
  border-radius: 30px;
  margin-top: 12px;
}

.stock-line {
  font-size: 1.3rem;
  color: #57070A;
  margin: 8px 0;
}

.qty-control button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #57070A;
  color: white;
  font-size: 2rem;
  border: none;
}

/* Login + Add Section */
#login-form,
.add-section {
  background: white;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 480px;
  margin: 20px auto;
  text-align: center;
}

#login-form input,
.add-section input,
#login-form button,
.add-section button {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 1.1rem;
}

#login-form button,
.add-section button {
  background: #57070A;
  color: white;
  font-weight: bold;
}

.logout-btn,
.delete-btn {
  background: #c0392b;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: -250px;
  top: 0;
  width: 250px;
  height: 100vh;
  background: #3f0a0f;
  padding-top: 100px;
  transition: 0.3s;
  z-index: 999;
}

/* Update the .sidebar-footer style */
.sidebar-footer {
  /* Use STICKY position to ensure it's always at the bottom of the viewport */
  position: sticky; 
  
  /* Pin it to the bottom */
  bottom: 0; 
  
  /* Resetting positioning properties */
  left: 0;
  right: 0;
  
  /* Styling */
  padding: 15px 10px;
  text-align: center;
  font-size: 0.8em;
  color: #a0a0a0; 
  border-top: 1px solid #6a0d15;
  background-color: #212121; 
  /* Ensure z-index is high so it covers other content */
  z-index: 10; 
  /* To ensure the footer is always the last item, you can use margin-top: auto;
     if you want to push it down when the content is short: */
  margin-top: auto; 
}

.sidebar.open {
  left: 0;
}

.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 30px;
  color: #f0d9b5;
  cursor: pointer;
  z-index: 1000;
}

.menu-item {
  padding: 20px;
  color: #f0d9b5;
  cursor: pointer;
  border-bottom: 1px solid #6a0d15;
}

.menu-item.active,
.menu-item:hover {
  background: #6a0d15;
}

.main-content {
  margin-left: 0;
  transition: 0.3s;
}

.sidebar.open ~ .main-content {
  margin-left: 250px;
}


.album-item {
  /* Use the same box styles as the stock items for consistency */
  background: white; 
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin-bottom: 25px; /* Add space below the item */
}

.album-item img {
  width: 100%;
  aspect-ratio: 9 / 16; /* Keep portrait aspect ratio */
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.2s; /* Subtle hover effect */
}

.album-item img:hover {
  transform: scale(1.02);
}


/* Mobile */
@media (max-width: 480px) {
  .logo { width: 130px; }
  header h1 { font-size: 1.3rem; }
  #catalog { grid-template-columns: 1fr; }
}
.stock-container {
  display: flex;
  justify-content: center;
  gap: 90px; /* space between Right and Left */
  margin-top: 10px;
}

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

.stock-block .label {
  font-size: 22px; /* bigger for the words */
  font-weight: bold;
  color: #333;
}

.stock-block .number {
  font-size: 20px; /* slightly smaller than label */
  font-weight: bold;
  margin-top: 5px;
  color: #555;
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366; /* WhatsApp green */
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 50px; /* fully rounded */
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
  z-index: 9999;
}

.whatsapp-float:hover {
  background-color: #128C7E; /* darker green on hover */
  transform: scale(1.05);    /* subtle hover effect */
}

/* Fullscreen Image Viewer */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.image-viewer img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  background: transparent !important;
  padding: 10px 18px;
  cursor: pointer;
  user-select: none;
}

.viewer-arrow.left {
  left: 20px;
}

.viewer-arrow.right {
  right: 20px;
}

.viewer-close {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}


/* Smooth fade-in & zoom animation */
@keyframes viewerFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes imageZoomIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.image-viewer {
  animation: viewerFadeIn 0.25s ease-out;
}

.image-viewer img {
  animation: imageZoomIn 0.3s ease-out;
}

/* Smooth crossfade on next/previous */
.viewer-image {
  transition: opacity 0.25s ease;
  opacity: 1;
}

.viewer-image.fade-out {
  opacity: 0;
}


.gallery {
  column-count: 2;              /* Pinterest style columns */
  column-gap: 12px;
  padding: 12px;
}

@media (min-width: 600px) {
  .gallery {
    column-count: 3;
  }
}

@media (min-width: 900px) {
  .gallery {
    column-count: 4;
  }
}

.gallery .item {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 14px;          /* Rounded collage look */
  display: block;
  break-inside: avoid;

  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

/* When loaded → fade in */
.gallery .item.loaded {
  opacity: 1;
  transform: translateY(0);
}

.qr-code-section {
  background: #3f0a0f;  /* Same dark red as your header */
  padding: 20px 15px;
  text-align: center;
  margin-top: 20px;
}

.qr-code-img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.qr-code-img:hover {
  transform: scale(1.08);
}

