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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #121212;
  color: #FFFFFF;
  overflow: hidden;
  height: 100vh;
}

/* Password Gate Overlay */
.gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0A0A0A;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gate-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  background-color: #161616;
  border: 1px solid #2A2A2A;
  padding: 48px 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.logo-container {
  margin-bottom: 32px;
}

.gate-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.gate-instruction {
  color: #8E8E93;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background-color: #222222;
  border: 1px solid #333333;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 15px;
  text-align: center;
  outline: none;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  border-color: #D4AF37;
}

.enter-btn {
  width: 100%;
  padding: 14px;
  background-color: #D4AF37;
  border: none;
  border-radius: 6px;
  color: #000000;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.enter-btn:hover {
  background-color: #C5A028;
}

.error-text {
  color: #FF453A;
  font-size: 12px;
  margin-top: 14px;
  min-height: 18px;
}

/* Main Layout */
.portal-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

.portal-container.hidden {
  display: none;
}

/* Header */
.portal-header {
  height: 70px;
  background-color: #1A1A1A;
  border-bottom: 1px solid #2C2C2E;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
}

.portal-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.control-group {
  display: flex;
  flex-direction: column;
}

.control-group label {
  font-size: 10px;
  color: #8E8E93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.control-group select {
  background-color: #2C2C2E;
  border: 1px solid #3A3A3C;
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 4px;
  outline: none;
  font-size: 13px;
  cursor: pointer;
}

.control-group select:focus {
  border-color: #D4AF37;
}

.view-toggle-group {
  display: flex;
  background-color: #2C2C2E;
  padding: 2px;
  border-radius: 6px;
  margin-left: 10px;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: #8E8E93;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background-color: #1A1A1A;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.download-pdf-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: #D4AF37;
  color: #000000;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: background-color 0.3s ease;
}

.download-pdf-btn:hover {
  background-color: #C5A028;
}

.logout-btn {
  padding: 10px 16px;
  background-color: transparent;
  color: #8E8E93;
  border: 1px solid #48484A;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  color: #FFFFFF;
  border-color: #8E8E93;
}

/* Main Grid */
.portal-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  height: calc(100vh - 70px);
}

/* Slider Section */
.slider-section {
  flex: 1;
  background-color: #121212;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.slider-container {
  width: 100%;
  max-width: 580px;
  height: 80%;
  max-height: 820px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
}

.slider-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #0A0A0A;
}

.slide-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0A0A0A;
}

.slide-page.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.slide-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(26, 26, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s ease;
}

.nav-arrow:hover {
  background-color: #D4AF37;
  color: #000000;
}

.prev-arrow {
  left: -22px;
}

.next-arrow {
  right: -22px;
}

/* Timeline */
.nav-timeline {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 580px;
  margin-top: 24px;
  gap: 16px;
  transition: all 0.3s ease;
}

.timeline-nav-btn {
  background: transparent;
  border: 1px solid #48484A;
  color: #8E8E93;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline-nav-btn:hover {
  color: #FFFFFF;
  border-color: #8E8E93;
}

.timeline-progress-bg {
  flex: 1;
  height: 4px;
  background-color: #2C2C2E;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.timeline-progress-bar {
  height: 100%;
  background-color: #D4AF37;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Grid View Container */
.grid-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 10px;
  transition: all 0.3s ease;
}

.grid-container.hidden {
  display: none;
}

.grid-viewport {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  padding: 20px;
}

.grid-card {
  background-color: #161616;
  border: 1px solid #2C2C2E;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.grid-card:hover {
  transform: translateY(-4px);
  border-color: #D4AF37;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.grid-card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 135%; /* A4 Portrait Ratio aspect helper */
  background-color: #0A0A0A;
}

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

.grid-card-page-num {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #D4AF37;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

.grid-card-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #FFFFFF;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
}

.grid-card-price-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid-card-retail {
  font-size: 11px;
  color: #8E8E93;
}

.grid-card-moq1 {
  font-size: 13px;
  font-weight: 600;
  color: #D4AF37;
}

/* Sidebar Section */
.sidebar-section {
  width: 400px;
  background-color: #161616;
  border-left: 1px solid #2C2C2E;
  padding: 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-indicator {
  font-size: 13px;
  font-weight: 600;
  color: #D4AF37;
  letter-spacing: 1px;
  margin-bottom: 24px;
  border-bottom: 1px solid #2C2C2E;
  padding-bottom: 12px;
}

.product-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 8px;
}

.product-sku {
  font-size: 11px;
  color: #8E8E93;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.product-detail-lines {
  font-size: 12px;
  color: #785D55;
  line-height: 1.5;
  margin: -12px 0 20px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #222222;
}

.price-row.retail-price-row {
  border-bottom: 1px solid #2C2C2E;
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.price-label {
  color: #8E8E93;
  font-size: 13px;
}

.price-val {
  font-weight: 600;
  font-size: 14px;
}

.retail-price-row .price-val {
  font-size: 18px;
  color: #FFFFFF;
}

.wholesale-header-row {
  font-weight: 600;
  font-size: 11px;
  color: #D4AF37;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.text-gold {
  color: #D4AF37;
}

/* Inquiry Box */
.inquiry-box {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid #2C2C2E;
}

.inquiry-box h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.inquiry-box p {
  font-size: 12px;
  color: #8E8E93;
  line-height: 1.5;
  margin-bottom: 20px;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background-color: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.whatsapp-btn:hover {
  background-color: #128C7E;
}

.unavailable-msg {
  color: #8E8E93;
  font-style: italic;
  font-size: 13px;
  text-align: center;
  padding: 40px 0;
  line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  body {
    overflow-y: auto;
    height: auto;
  }
  
  .portal-header {
    height: auto;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }
  
  .portal-toolbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  
  .portal-main {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .slider-section {
    height: 65vh;
    min-height: 480px;
  }
  
  .sidebar-section {
    width: 100%;
    border-left: none;
    border-top: 1px solid #2C2C2E;
    height: auto;
    overflow: visible;
  }
  
  .nav-arrow {
    width: 36px;
    height: 36px;
  }
  
  .prev-arrow {
    left: 8px;
  }
  
  .next-arrow {
    right: 8px;
  }
}
