:root {
  --forest: #284e36;
  --brass: #c6aa76;
  --wheat: #f1eadb;
  --oat: #f8f5ed;
  --black: #000000;
  --white: #ffffff;
  --font-primary: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  background: var(--oat);
  color: var(--black);
}

.hero {
  background: var(--forest);
  color: var(--white);
  padding: 48px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hero__content h1 {
  margin: 0 0 8px;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  letter-spacing: 0.04em;
}

.hero__content p {
  margin: 0;
  font-size: 1.1rem;
  max-width: 640px;
}

.hero__badge {
  background: var(--brass);
  color: var(--forest);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  padding: 40px 64px 72px;
}

.panel {
  background: var(--white);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 32px rgba(40, 78, 54, 0.12);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel--full {
  grid-column: 1 / -1;
}

.panel h2 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--forest);
  letter-spacing: 0.02em;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  margin-left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(198, 170, 118, 0.2);
  color: var(--forest);
}

.panel__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 24px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
  gap: 6px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

input,
textarea,
select,
button {
  font-family: inherit;
}

input,
textarea,
select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(40, 78, 54, 0.25);
  background: var(--oat);
  color: var(--black);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(198, 170, 118, 0.35);
}

.panel__footer {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cta {
  background: var(--forest);
  color: var(--white);
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(40, 78, 54, 0.2);
}

.cta:disabled {
  background: rgba(40, 78, 54, 0.45);
  cursor: not-allowed;
  box-shadow: none;
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
}

.search-bar {
  display: flex;
  gap: 12px;
}

.search-bar button {
  background: var(--brass);
  border: none;
  color: var(--forest);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-bar button:hover {
  background: #b6965d;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.list::-webkit-scrollbar {
  width: 8px;
}

.list::-webkit-scrollbar-thumb {
  background: rgba(40, 78, 54, 0.35);
  border-radius: 999px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(40, 78, 54, 0.15);
  border-radius: 14px;
  background: var(--wheat);
  align-items: center;
}

.list-item__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-item__meta h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--forest);
}

.list-item__meta p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.7);
}

.list-item__meta .product-description {
  font-size: 0.8rem;
  color: var(--forest);
  font-style: italic;
  opacity: 0.85;
  padding: 2px 0;
  border-left: 2px solid var(--brass);
  padding-left: 8px;
  margin: 4px 0;
}

.list-item__meta .product-price {
  font-weight: 600;
  color: var(--forest);
}

.list-item button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.list-item button.add {
  background: var(--forest);
  color: var(--white);
}

.list-item button.remove {
  background: transparent;
  border: 1px solid var(--forest);
  color: var(--forest);
}

.list--selected .list-item {
  background: var(--oat);
}

.hint--layout {
  font-size: 0.85rem;
  color: var(--forest);
  opacity: 0.7;
  margin: 0 0 12px 0;
}

.list-item--with-layout {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-item--with-layout .list-item__meta {
  flex: 1;
}

.list-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.product-layout-select {
  padding: 6px 10px;
  border: 2px solid var(--forest);
  border-radius: 6px;
  background: var(--white);
  color: var(--forest);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 90px;
}

.product-layout-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(40, 78, 54, 0.2);
}

.roomshot-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.roomshot-form button {
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.roomshot-form button:hover {
  opacity: 0.9;
}

.roomshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.roomshot-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(40, 78, 54, 0.12);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roomshot-card--selected {
  border-color: var(--brass);
  box-shadow: 0 16px 32px rgba(198, 170, 118, 0.24);
}

.roomshot-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.roomshot-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roomshot-card__body h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--forest);
}

.roomshot-card__body p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.7);
}

.roomshot-card__actions {
  position: absolute;
  top: 16px;
  right: 16px;
}

.roomshot-card__actions button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(248, 245, 237, 0.9);
  color: var(--forest);
  border: 1px solid var(--forest);
  transition: background 0.2s ease, color 0.2s ease;
}

.roomshot-card__actions button.selected {
  background: var(--forest);
  color: var(--white);
}

/* Roomshot selection summary */
.roomshot-selection-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--wheat);
  border-radius: 12px;
  margin-bottom: 8px;
}

.selection-badge {
  font-size: 0.9rem;
  color: var(--forest);
}

.selection-badge strong {
  font-weight: 600;
}

/* Two-button actions for roomshots */
.roomshot-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roomshot-card__actions button {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(248, 245, 237, 0.95);
  color: var(--forest);
  border: 1px solid var(--forest);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.roomshot-card__actions button:hover {
  background: var(--wheat);
}

.roomshot-card__actions button.gallery-btn.selected {
  background: var(--brass);
  color: var(--forest);
  border-color: var(--brass);
}

.roomshot-card__actions button.fullpage-btn.selected {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}

/* Card selected states */
.roomshot-card--gallery {
  border-color: var(--brass);
  box-shadow: 0 16px 32px rgba(198, 170, 118, 0.24);
}

.roomshot-card--fullpage {
  border-color: var(--forest);
  box-shadow: 0 16px 32px rgba(40, 78, 54, 0.24);
}

.roomshot-card--both {
  border-color: var(--brass);
  box-shadow: 0 16px 32px rgba(198, 170, 118, 0.3), 0 8px 16px rgba(40, 78, 54, 0.2);
}

.status {
  padding: 16px;
  border-radius: 12px;
  background: rgba(198, 170, 118, 0.22);
  color: var(--forest);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer {
  padding: 32px 64px 48px;
  text-align: center;
  background: var(--forest);
  color: rgba(255, 255, 255, 0.75);
}

/* Image Preview Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--forest);
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal__close:hover {
  background: var(--white);
}

.modal__image {
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.modal__info {
  padding: 20px 24px;
  background: var(--oat);
}

.modal__title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: var(--forest);
}

.modal__caption {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.7);
}

.modal__actions {
  padding: 16px 24px 20px;
  background: var(--oat);
  border-top: 1px solid rgba(40, 78, 54, 0.1);
  display: flex;
  justify-content: center;
  gap: 16px;
}

.modal__select {
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal__select:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(40, 78, 54, 0.2);
}

.modal__select.selected {
  background: var(--brass) !important;
  color: var(--forest) !important;
}

/* Clickable roomshot image */
.roomshot-card img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.roomshot-card img:hover {
  opacity: 0.9;
}

/* =============================================================================
   PASSWORD PROTECTION OVERLAY
   ============================================================================= */

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--forest);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-modal {
  background: var(--white);
  border-radius: 24px;
  padding: 48px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3);
  text-align: center;
}

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

.auth-logo h1 {
  margin: 0;
  font-size: 2.2rem;
  color: var(--forest);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.auth-logo span {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  color: var(--brass);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
  text-align: left;
  font-weight: 500;
}

.auth-form input {
  padding: 16px 18px;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 2px solid rgba(40, 78, 54, 0.2);
  text-align: center;
  letter-spacing: 0.2em;
}

.auth-form input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(40, 78, 54, 0.15);
}

.auth-submit {
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(40, 78, 54, 0.25);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-error {
  color: #c53030;
  font-size: 0.9rem;
  margin: 8px 0 0;
  padding: 12px;
  background: rgba(197, 48, 48, 0.1);
  border-radius: 8px;
  font-weight: 500;
}

.auth-hint {
  margin: 24px 0 0;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Fade out animation for auth overlay */
.auth-overlay.fade-out {
  animation: authFadeOut 0.4s ease-out forwards;
}

@keyframes authFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

/* App content wrapper */
.app-content {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.app-content.visible {
  opacity: 1;
}

@media (max-width: 960px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .layout {
    padding: 32px 24px 64px;
  }

  .panel {
    padding: 24px;
  }
  
  .modal__content {
    max-width: 95vw;
  }
  
  .modal__image {
    max-width: 95vw;
    max-height: 60vh;
  }
  
  .auth-modal {
    padding: 32px 24px;
  }
}


