/* =========================================================
   public.css — Production-specific overrides & Bootstrap fixes
   Loaded after prototype.css and Bootstrap 5.3.
   Keeps intentional design improvements (clamp sizing, specs
   separator rows) while restoring prototype fidelity everywhere
   else.
   ========================================================= */

/* ── Loading Overlay ─────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #000;
  /* Fallback accent color */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  color: #000;
  text-transform: uppercase;
}

/* ── Navbar ─────────────────────────────────────────────── */
/* ── Navbar Restructure ───────────────────────────────────── */
.navbar {
  position: sticky !important;
  top: 0;
  width: 100%;
  z-index: 1500;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1600px !important;
  margin: 0 auto;
  padding: 0 2rem !important;
  height: 70px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.nav-toggle-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: -8px;
}

.nav-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}

.navbar .brand a {
  font-size: 22px;
  letter-spacing: 0.12em;
  font-weight: 700;
  white-space: nowrap;
}

/* Hide hamburger on desktop */
.nav-toggle-btn {
  display: none;
}

/* ── Sidebars ────────────────────────────────────────────── */
.history-sidebar {
  position: sticky !important;
  top: 70px !important;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
  background: white;
}

.history-list {
  flex: 1;
  overflow-y: auto;
}

.year-sidebar {
  position: sticky !important;
  top: 70px !important;
  z-index: 10;
}

.policy-page .history-sidebar,
.policy-page .year-sidebar,
.policy-page .resizer {
  display: none !important;
}

.policy-page main {
  width: 100% !important;
  margin-left: 0 !important;
}

/* ── Modals & Previews ───────────────────────────────────── */
.modal-backdrop {
  z-index: 2500 !important;
  /* Ensure it stays above navbar (1500) */
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 50%;
  z-index: 10;
}

.nav-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.nav-prev {
  left: 1rem;
}

.nav-next {
  right: 1rem;
}

@media (max-width: 768px) {
  .nav-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 2rem !important;
  flex: 1;
  justify-content: flex-end;
  padding: 0 1vw;
}

.search-bar {
  width: 100%;
  max-width: 280px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem !important;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--text-primary);
  background: #fff;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

/* ── Mobile Year Strip ──────────────────────────────────── */
.mobile-year-strip {
  display: none;
  /* shown via media query */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.98);
  position: sticky;
  top: 70px;
  z-index: 900;
  gap: 0.5rem;
}

.mobile-year-strip::-webkit-scrollbar {
  display: none;
}

.mobile-year-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.mobile-year-pill:last-child {
  margin-right: 0;
}

.mobile-year-pill.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

/* ── Drawer empty state ──────────────────────────────────── */
.drawer-empty {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 1rem 0;
}

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.drawer-footer-link {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.drawer-footer-link:hover {
  color: var(--text-primary);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 340px;
  max-width: 85vw;
  background: #fff;
  z-index: 2100;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.drawer-brand-text {
  font-family: var(--font-logo);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.drawer-tagline {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.drawer-close {
  background: none;
  border: none;
  padding: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.drawer-search {
  position: relative;
  margin-bottom: 1rem;
}

.drawer-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  pointer-events: none;
}

.drawer-search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.25rem;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  background: #f9f9f9;
  outline: none;
  transition: var(--transition);
}

.drawer-search-input:focus {
  border-color: var(--text-primary);
  background: #fff;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.drawer-section {
  margin-bottom: 2.5rem;
}

.drawer-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.75rem 0;
  transition: var(--transition);
}

.drawer-link:hover {
  color: var(--accent-color);
  transform: translateX(5px);
}

.mobile-history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.mobile-history-item:hover {
  background: #f0f0f0;
}

.mobile-history-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.mobile-history-info {
  flex: 1;
  min-width: 0;
}

.mobile-history-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.mobile-history-sku {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

/* ── Catalogue grid ─────────────────────────────────────── */
.catalogue-grid {
  min-height: 40vh;
}

@media (min-width: 1024px) {
  .catalogue-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    column-gap: 10rem !important;
    row-gap: 7rem !important;
  }
}

.painting-card {
  animation: cardFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Catalogue grid ─────────────────────────────────────── */

/* ── Policy page ────────────────────────────────────────── */
.policy-body ul {
  list-style: disc;
  margin-left: 1.5rem;
}

.policy-container {
  /* max-width: 900px; */
}

.policy-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 2rem;
}

.policy-body {
  display: grid;
  gap: 1rem;
  text-align: justify;
}

.details-image-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.details-image-container {
  position: relative;
  display: inline-block;
  cursor: crosshair;
  line-height: 0;
}

.details-main-image {
  max-width: min(100%, 820px);
  display: block;
  height: auto;
}

.zoom-lens {
  position: absolute;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.3);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease;
}

.zoom-window {
  position: absolute;
  left: 100%;
  margin-left: 40px;
  top: 0;
  border: 1px solid var(--border-color);
  background-color: #fff;
  background-repeat: no-repeat;
  visibility: hidden;
  opacity: 0;
  z-index: 2000;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.details-image-container:hover .zoom-lens,
.details-image-container:hover .zoom-window {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 1199px) {
  .zoom-window {
    width: 400px;
    height: 400px;
    margin-left: 20px;
  }
}

@media (max-width: 1023px) {

  .zoom-window,
  .zoom-lens {
    display: none !important;
  }
}

/*
 * Thumbnail strip — restore prototype values exactly.
 * prototype.css already defines these; the old public.css
 * accidentally overrode them with weaker styles (no border,
 * no border-radius, wrong size). Removed those overrides.
 */

/* ── Detail page — info section ─────────────────────────── */
.details-info-section {
  /* max-width: 900px; */
  /* matches prototype (was 960px) */
}

.info-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  /* restored from prototype */
}

/* Intentional improvement: responsive title size (kept) */
.detail-title {
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  /* restored to prototype weight */
}

.detail-artist {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ── Specs list — intentional separator style (kept) ─────── */
.specs-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0 0 2rem 0;
}

.specs-list li {
  display: flex;
  justify-content: flex-start;
}

.spec-label {
  font-size: 18px;
  min-width: 120px;
  color: var(--text-primary);
}

.artwork-description {
  margin: 2.5rem 0 1.5rem;
  color: var(--text-primary);
}

.artwork-description h6 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.artwork-description div {
  line-height: 1.6;
  font-size: 15px;
  opacity: 0.85;
  white-space: pre-line;
  text-align: justify;
}

/* ── Currency toggle — restore prototype values ──────────── */
/*
 * The old public.css set a grey border and large padding on
 * .pill-toggle / .toggle-btn, overriding prototype's tight
 * black-bordered pill. Removed those and rely on prototype.css.
 */

/* ── Price display — intentional responsive size (kept) ─── */
.detail-price-row {
  margin: 1.5rem 0;
}

.detail-price {
  font-size: 40px;
  font-weight: 500;
}

/* ── Buttons — Bootstrap 5 conflict fixes ────────────────── */
/*
 * Bootstrap's .btn adds border-radius, and .btn-primary sets
 * background to #0d6efd. Override globally so all custom
 * buttons match the prototype regardless of where they appear.
 */
.btn {
  border-radius: 0 !important;
  font-family: var(--font-family) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-size: var(--font-size-primary, 18px) !important;
  font-weight: 500 !important;
  line-height: inherit !important;
}

.btn-primary {
  background-color: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible {
  background-color: #333 !important;
  border-color: #333 !important;
  color: #fff !important;
  box-shadow: none !important;
  outline: none !important;
}

.btn-secondary {
  background-color: transparent !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary:focus-visible {
  background-color: transparent !important;
  border-color: var(--accent-color) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Purchase section button keeps its specific sizing */
.purchase-section .btn-primary {
  padding: .6rem 1.2rem;
  display: inline-flex;
  align-items: center;
}

/* ── Form inputs — remove Bootstrap focus glow ───────────── */
/*
 * Bootstrap 5 adds a blue box-shadow on :focus for all inputs.
 * The prototype uses only a border-color change.
 */
.form-group input:focus,
.form-group textarea:focus,
.share-email-input:focus {
  box-shadow: none !important;
  outline: none !important;
  border-color: var(--accent-color) !important;
}

/* ── Shipping info ──────────────────────────────────────── */
.shipping-info {
  color: var(--text-secondary);
}

/* ── Misc ───────────────────────────────────────────────── */
.flash-inline {
  margin-top: 1rem;
}

/* ── Modal Fix ──────────────────────────────────────────── */
/* 
 * Ensure hidden modals don't capture clicks. Bootstrap 5 adds 
 * properties to .modal-backdrop and .modal-content that can 
 * override custom pointer-events rules.
 */
body.modal-open {
  overflow: hidden !important;
}

.modal-backdrop {
  visibility: hidden;
  pointer-events: none !important;
}

.modal-backdrop.active {
  visibility: visible;
  pointer-events: auto !important;
}

#enquiry-modal {
  overflow: hidden !important; /* Disable scrollbar entirely */
  padding: 20px !important;
}

#enquiry-modal .modal-content {
  margin: auto !important;
  border-radius: 0 !important; /* Elegant minimalist sharp corners */
  padding: 2rem !important;    /* Highly compact padding */
  border: 1px solid #eaeaea !important;
  max-width: 440px !important; /* Slimmer, ultra-premium portrait width */
}

.modal-backdrop:not(.active) .modal-content {
  transform: translateY(20px);
  opacity: 0;
}

.modal-backdrop {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Luxury Minimalist Form Styles */
#enquiry-modal .close-modal {
  font-family: inherit !important;
  font-weight: 300 !important;
  font-size: 24px !important;
  color: #000 !important;
  opacity: 0.4;
  transition: opacity 0.2s ease !important;
  top: 1rem !important;
  right: 1.25rem !important;
  background: none;
  border: none;
}

#enquiry-modal .close-modal:hover {
  opacity: 1 !important;
}

#enquiry-modal .modal-artwork-summary {
  border-bottom: 1px solid #eaeaea !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 1rem !important;
  gap: 1.25rem !important;
}

#enquiry-modal .modal-thumb {
  width: 60px !important;       /* Reduced image height */
  height: 60px !important;
  border: 1px solid #eaeaea !important;
  padding: 4px !important;
  background: #fff !important;
  border-radius: 0 !important;
}

#enquiry-modal .modal-text-summary h2 {
  font-size: 18px !important;   /* Sleeker header */
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: #000 !important;
  margin-bottom: 0.1rem !important;
}

#enquiry-modal .modal-text-summary .modal-subtitle {
  font-size: 13px !important;
  color: #666 !important;
  font-style: italic !important;
}

#enquiry-modal .form-group {
  margin-bottom: 0.85rem !important; /* Highly reduced bottom margin */
}

#enquiry-modal .form-group label {
  font-size: 10px !important;   /* Sleek small labels */
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: #555 !important;
  margin-bottom: 0.3rem !important;
}

#enquiry-modal .form-group input,
#enquiry-modal .form-group textarea {
  font-size: 13px !important;
  border: 1px solid #ccc !important;
  border-radius: 0 !important;
  background-color: #fafafa !important;
  padding: 0.55rem 0.65rem !important; /* Premium tight padding */
  transition: border-color 0.2s, background-color 0.2s !important;
  font-family: inherit !important;
}

#enquiry-modal .form-group input:focus,
#enquiry-modal .form-group textarea:focus {
  border-color: #000 !important;
  background-color: #fff !important;
}

#enquiry-modal .btn-primary {
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  padding: 0.9rem !important;
  border-radius: 0 !important;
  background: #000 !important;
  border: 1px solid #000 !important;
  color: #fff !important;
  transition: background 0.2s, border-color 0.2s !important;
}

#enquiry-modal .btn-primary:hover {
  background: #333 !important;
  border-color: #333 !important;
}

#enquiry-success .success-icon {
  background-color: #000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  width: 50px !important;
  height: 50px !important;
  font-size: 20px !important;
}

#enquiry-success h2 {
  font-size: 24px !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
}

#enquiry-success p {
  font-size: 15px !important;
  color: #666 !important;
  margin-bottom: 1.5rem !important;
}

#enquiry-success .btn-secondary {
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  padding: 0.75rem !important;
  border-radius: 0 !important;
  border: 1px solid #000 !important;
  background: transparent !important;
  color: #000 !important;
  transition: background 0.2s !important;
}

#enquiry-success .btn-secondary:hover {
  background: #f5f5f5 !important;
}

@media (max-width: 576px) {
  .modal-content {
    padding: 1.5rem !important;
    width: 95% !important;
  }

  .modal-artwork-summary {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  .modal-text-summary h2 {
    font-size: 1.25rem !important;
  }

  .modal-thumb {
    width: 60px !important;
    height: 60px !important;
  }
}

.image-copyright {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 899px) {

  /* Show hamburger, hide tagline (shown in drawer instead) */
  .nav-toggle-btn {
    display: flex !important;
  }

  .nav-tagline {
    display: none !important;
  }

  /* Hide navbar search — moved into drawer */
  .nav-actions {
    display: none !important;
  }

  .nav-container {
    padding: 0 1rem !important;
    height: 70px;
  }

  .nav-left-group {
    gap: 0.75rem;
  }

  .navbar .brand a {
    font-size: 20px !important;
    letter-spacing: 0.1em !important;
  }

  .nav-links {
    display: none !important;
  }

  .nav-actions-group {
    gap: 1rem !important;
  }

  /* Hide desktop history sidebar & resizer, keep year sidebar */
  .history-sidebar,
  .resizer {
    display: none !important;
  }

  /* Make year sidebar horizontal strip */
  .year-sidebar {
    position: sticky !important;
    top: 70px !important;
    z-index: 900 !important;
    width: 100% !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    padding: 0.65rem 1rem !important;
    overflow-x: auto !important;
  }

  .sidebar-years-container {
    flex-wrap: nowrap !important;
    gap: 1.25rem !important;
  }

  .sidebar-year {
    font-size: 14px !important;
    padding: 0.25rem 0 !important;
  }

  .sidebar-visitors {
    display: none;
  }

  /* Show mobile year strip (hidden on desktop) — not needed here, kept for reference */
  .mobile-year-strip {
    display: none !important;
  }

  /* Reset layout to scroll naturally */
  .layout-container {
    height: auto !important;
    overflow: visible !important;
    flex-direction: column !important;
  }

  main {
    width: 100% !important;
    padding: 1.5rem !important;
    margin-left: 0 !important;
    overflow-y: visible !important;
    height: auto !important;
  }

  .catalogue-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem 1.5rem !important;
  }

  /* Search bar mobile */
  .search-bar {
    max-width: 150px !important;
  }

  .search-bar input {
    font-size: 13px !important;
    padding: 0.4rem 0.75rem 0.4rem 2rem !important;
  }

  .details-action-sidebar {
    padding-left: 0 !important;
  }
}

@media (max-width: 480px) {
  .navbar .brand a {
    font-size: 18px !important;
  }

  .catalogue-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .search-bar {
    max-width: 110px !important;
  }


}

/* ── Sidebar Newsletter ────────────────────────────────── */
.sidebar-newsletter {
  margin-top: auto;
  padding-top: 1vw;
  border-top: 1px solid var(--border-color);
  background: white;
  flex-shrink: 0;
}

.sidebar-newsletter h6 {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  margin: 0;
  color: #111;
  margin-bottom: 5px;
}

.sidebar-newsletter p {
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.sidebar-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-newsletter-form input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid #eee;
  background: #fcfcfc;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease;
}

.sidebar-newsletter-form input:focus {
  border-color: #111;
}

.sidebar-newsletter-form button {
  width: 100%;
  padding: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: #111;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-newsletter-form button:hover {
  background: #333;
}

.newsletter-msg-small {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  line-height: 1.3;
}

.newsletter-msg-small.success {
  color: #2e7d32;
}

.newsletter-msg-small.error {
  color: #d32f2f;
}

/* ── Mobile Drawer Newsletter ─────────────────────────── */
.drawer-newsletter {
  padding: 1rem 1.5rem 0;
  background: #fdfdfd;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.drawer-newsletter h6 {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.drawer-newsletter p {
  font-size: 11px;
  margin-bottom: 12px;
}

.drawer-newsletter .sidebar-newsletter-form {
  gap: 0.4rem;
}

.drawer-newsletter .sidebar-newsletter-form input {
  padding: 0.5rem 0.75rem;
  font-size: 13px;
}

.drawer-newsletter .sidebar-newsletter-form button {
  font-size: 12px;
  width: 10vw;
}

/* Input with submit icon styling */
.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-right: 3rem;
  /* Make room for the icon */
}

.input-submit-icon {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.input-submit-icon:hover {
  color: var(--text-secondary);
}

.input-submit-icon svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 576px) {
  .history-sidebar {
    display: none !important;
  }
}