/* =========================
   GLOBAL STYLES (ALL PAGES)
   ========================= */
:root {
  --bg: #fff;
  --muted: #666;
  --accent: #111;
}
* {
  box-sizing: border-box;
}
body {
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  color: var(--accent);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* =========================
   INDEX PAGE (index.html)
   ========================= */

/* Index background image */
body.landing-bg {
  background: url('/images/leather-bg2.jpeg') no-repeat center center fixed;
  background-size: cover;
  background-color: #fff;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

/* Saia logo on index page */
.site-header {
  padding: 0;
  border-bottom: none;
  display: flex;
  justify-content: center;
  align-items: center;
}
.site-header .logo {
  height: 200px; /* 75% of 569px */
  display: block;
  margin: -200px 0 32px 0;
}

/* Main container for scroll snap effect */
#mainContainer {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  /* scrollbar-width: none; */ /* Firefox */
}
/* #mainContainer::-webkit-scrollbar {
  display: none;
} */ /* Chrome, Safari, Opera */

/* Fullscreen sections for scroll snap */
.section-fullscreen {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.section-white {
  background: #fff;
}

/* "Enter password" input styling */
#archivePassword.btn.btn-large {
  background: rgba(17, 17, 17, 0.7); /* Changed from #111 to semi-transparent */
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 18px; /* 75% of 24px */
  padding: 18px 28px; /* 75% of 24px 38px */
  text-align: center;
  outline: none;
  transition: background 0.2s;
}
#archivePassword.btn.btn-large:focus {
  background: rgba(34, 34, 34, 0.8); /* Changed from #222 to semi-transparent */
}
#archiveLoginForm {
  margin-top: -50px; /* changed from -150px to -50px */
}

/* Scroll indicator arrow (moving arrow at bottom of index) */
/*
.scroll-indicator {
  margin-top: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: bounce 1.5s infinite;
  margin-left: -75px;
  position: relative;
}
.scroll-indicator svg {
  margin-top: 8px;
  width: 75px;
  height: 75px;
}
.scroll-indicator svg path {
  fill: #fff;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0);}
  50% { transform: translateY(10px);}
}
*/

/* About/Contact/Social section */
.bio {
  color: #bebdbd;
  text-align: center;
  margin-top: 32px;
}
.bio h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}
.bio p {
  text-align: center;
}

/* =========================
   ARCHIVE & ADMIN PAGES (archive.html, admin.html)
   ========================= */

/* Archive/Admin page background */
body.archive-bg {
  background: #f8f8f8;
}

/* Archive/Admin navbar */
.archive-navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: url('/images/leather-bg.jpeg') no-repeat center 80%;
  background-size: cover;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  padding: 0 40px;
  box-sizing: border-box;
}
.archive-navbar img {
  height: 95px;
  width: auto;
  margin-left: -35px;
  margin-top: 10px;
  filter: none;
}
.archive-navbar .navbar-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
}
.archive-navbar .navbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Archive/Admin main container */
.archive-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 64px 24px;
  background: #f8f8f8;
  border-radius: 24px;
  min-height: 70vh;
}

/* =========================
   ARCHIVE/ADMIN GRID & CARDS
   ========================= */

/* Garment grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 32px;
  align-items: start;
  margin-top: 24px;
}
.card {
  background: #f8f8f8;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.card img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 0;
  margin-bottom: 0;
  transition: transform 0.2s;
}
.card:hover img {
  transform: scale(1.04);
}
.card .brand {
  color: #666;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 4px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #222;
  letter-spacing: 0.01em;
  text-align: left;
}
.card .size {
  color: #888;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: left;
}
.card .meta {
  color: #222;
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 4px;
  text-align: left;
}
.card .desc {
  color: #888;
  font-size: 0.98rem;
  margin-bottom: 8px;
  text-align: left;
}
.card.dragElem {
  opacity: 0.4;
}
.card.over {
  border: 2px dashed #888;
}

/* =========================
   ADMIN PAGE ONLY (admin.html)
   ========================= */

/* Edit Page button */
.btn-edit {
  background: #222;
  color: #fff;
  border: 1px solid #222;
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.btn-edit:hover {
  background: #444;
  border-color: #444;
}

/* Admin delete button */
.btn-delete {
  background: #c00;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 15px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.btn-delete:hover {
  background: #a00;
}

/* Add Garment Modal */
#editModal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
#editModal.active {
  display: flex;
}
#editModal .modal-bg {
  background: rgba(0,0,0,0.25);
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#editModal .modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.13);
  padding: 32px 28px;
  min-width: 340px;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 10001;
}

/* Add Garment Form */
.add-garment-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  padding: 24px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}
.add-garment-form label {
  font-weight: 500;
  margin-bottom: 4px;
}
.add-garment-form input,
.add-garment-form select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 1rem;
  margin-bottom: 8px;
}
.add-garment-form .img-drop-zone {
  border: 2px dashed #bbb;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: #888;
  background: #fafafa;
  cursor: pointer;
  margin-bottom: 8px;
}
.add-garment-form .img-preview {
  max-width: 100%;
  max-height: 180px;
  margin: 12px auto;
  display: block;
  border-radius: 8px;
}
.add-garment-form .btn {
  width: 100%;
  padding: 12px 0;
  font-size: 1rem;
  border-radius: 6px;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.add-garment-form .btn:hover {
  background: #222;
}

/* =========================
   BUTTONS (ALL PAGES)
   ========================= */
.btn {
  display: inline-block;
  padding: 10px 16px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}
.btn-large {
  padding: 24px 38px;
  font-size: 24px;
  border-radius: 11px;
}

/* =========================
   CAROUSEL (ARCHIVE/ADMIN)
   ========================= */
.carousel-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  transition: opacity 0.3s;
  display: block;
}
.carousel-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.carousel-btn {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  color: #111;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover {
  background: #eee;
}

/* Image container for positioning arrows */
.image-container {
  position: relative;
  margin-bottom: 18px;
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0;
  z-index: 10;
}

.image-container:hover .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-arrow-left {
  left: 12px;
}

.carousel-arrow-right {
  right: 12px;
}

/* =========================
   RESPONSIVE STYLES
   ========================= */
@media (max-width: 700px) {
  /* Mobile font sizing for About section */
  #aboutSection h2 {
    font-size: 1.35rem !important; /* Reduced from 2rem */
    margin-bottom: 20px !important;
  }
  
  #aboutSection h3 {
    font-size: 1.05rem !important; /* Reduced from 1.25rem */
    margin-bottom: 10px !important;
  }
  
  #aboutSection p {
    font-size: 0.9rem !important; /* Reduced from 1.1rem and default */
    line-height: 1.4 !important; /* Tighter line spacing */
    margin-bottom: 16px !important; /* Reduced margins */
  }
  
  #aboutSection div {
    max-width: 95% !important; /* Use more screen width */
    padding: 0 15px !important;
  }
  
  /* Compact spacing for mobile */
  #aboutSection .section-fullscreen {
    padding: 20px 0 40px 0 !important;
  }

  .archive-navbar {
    height: 48px;
    padding: 0 12px;
  }
  .archive-navbar img {
    height: 40px; /* Much smaller for mobile */
    margin-left: -10px;
    margin-top: 2px;
  }
  .archive-navbar .navbar-title {
    font-size: 1.1rem;
  }
  .archive-navbar .navbar-actions {
    gap: 8px;
  }
  .archive-navbar .navbar-actions .btn {
    padding: 6px 12px;
    font-size: 14px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .card img {
    height: 180px;
  }
  
  /* Fix scroll snap on mobile */
  #mainContainer {
    scroll-snap-type: none; /* Disable scroll snap on mobile */
  }
  .section-fullscreen {
    scroll-snap-align: none;
    min-height: auto; /* Allow natural height on mobile */
  }
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 18px;
  }
  .archive-container {
    padding: 16px 6px 32px 6px;
    border-radius: 12px;
  }
}
/* Shake animation */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
  100% { transform: translateX(0); }
}
.shake {
  animation: shake 0.5s;
}
