/* ==========================================================================
   Painters Catalogue — Bootstrap theme override
   Maps the existing cream / charcoal palette (previously defined by
   css/styles.css :root) onto Bootstrap 5's CSS custom properties so the
   whole site renders on Bootstrap primitives while keeping the original
   visual identity (Playfair Display headings + Inter body).
   Load this AFTER bootstrap.min.css.
   ========================================================================== */

:root {
  /* Cream palette */
  --cream-50: #fefdfb;
  --cream-100: #fdf9f3;
  --cream-200: #faf4e7;
  --cream-300: #f5ead1;
  --cream-400: #efddb3;
  --cream-500: #e6cd8b;

  /* Charcoal palette */
  --charcoal-50: #f6f6f6;
  --charcoal-100: #e7e7e7;
  --charcoal-200: #d1d1d1;
  --charcoal-300: #b0b0b0;
  --charcoal-400: #888888;
  --charcoal-500: #6d6d6d;
  --charcoal-600: #5d5d5d;
  --charcoal-700: #4f4f4f;
  --charcoal-800: #454545;
  --charcoal-900: #3d3d3d;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Warm accent — used sparingly, only for the details worth highlighting */
  --accent: #8a4b32;
  --accent-600: #743e29;
  --accent-100: #f1e3da;

  /* Map the palette onto Bootstrap's theme / utility variables */
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: 1rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.5;
  --bs-body-color: var(--charcoal-900);
  --bs-body-bg: var(--cream-50);
  --bs-emphasis-color: var(--charcoal-900);
  --bs-secondary-color: var(--charcoal-700);
  --bs-secondary-bg: var(--cream-100);
  --bs-tertiary-color: var(--charcoal-600);
  --bs-tertiary-bg: var(--cream-200);
  --bs-border-color: var(--cream-200);
  --bs-border-color-translucent: rgba(90, 76, 30, 0.1);

  /* Theme color roles → site palette */
  --bs-primary: var(--charcoal-900);
  --bs-primary-rgb: 61, 61, 61;
  --bs-secondary: var(--charcoal-500);
  --bs-secondary-rgb: 109, 109, 109;
  --bs-success: #4a7b4a;
  --bs-info: var(--charcoal-400);
  --bs-warning: var(--cream-400);
  --bs-danger: #a0403a;
  --bs-light: var(--cream-100);
  --bs-light-rgb: 253, 249, 243;
  --bs-dark: var(--charcoal-900);
  --bs-dark-rgb: 61, 61, 61;

  --bs-link-color: var(--charcoal-700);
  --bs-link-hover-color: var(--charcoal-900);
  --bs-link-decoration: none;

  --bs-border-radius: 0.125rem;
  --bs-border-radius-sm: 0.125rem;
  --bs-border-radius-lg: 0.25rem;
  --bs-border-radius-pill: 50rem;

  --bs-focus-ring-color: rgba(61, 61, 61, 0.25);
}

/* ==========================================================================
   Editorial section spacing — generous vertical breathing room
   ========================================================================== */
.py-6 { padding-top: 5.5rem !important; padding-bottom: 5.5rem !important; }
.py-7 { padding-top: 7rem !important; padding-bottom: 7rem !important; }
.py-8 { padding-top: 8.5rem !important; padding-bottom: 8.5rem !important; }
.pt-7 { padding-top: 7rem !important; }
.pb-7 { padding-bottom: 7rem !important; }
.mt-7 { margin-top: 7rem !important; }

/* ==========================================================================
   Minimal text links — no button boxes, quiet until hovered
   ========================================================================== */
.text-link {
  --link-c: var(--charcoal-700);
  --link-line: var(--charcoal-300);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--link-c);
  text-decoration: none;
  padding-bottom: 0.15rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 1px;
  transition: background-size 0.35s ease, color 0.35s ease;
}
.text-link .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.text-link:hover { color: var(--accent); background-size: 100% 1px; }
.text-link:hover .arrow { transform: translateX(4px); }
.text-link.dropdown-toggle::after {
  margin-left: 0.25rem;
  vertical-align: inherit;
}
.text-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Subtle muted link for quiet secondary actions */
.text-link-muted { --link-c: var(--charcoal-500); --link-line: var(--charcoal-300); }
.text-link-muted:hover { color: var(--charcoal-800); }

/* ==========================================================================
   Minimal link bar / index-style discreet nav links
   ========================================================================== */
.minimal-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}
.minimal-links a {
  color: var(--charcoal-600);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.minimal-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.minimal-links a.c-link-strong { color: var(--charcoal-900); }

/* Headings default to the serif display face */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--charcoal-900);
}

/* Body background / text already handled by the mapped Bootstrap vars,
   but force these to the theme values for safety. */
body {
  background-color: var(--cream-50);
  color: var(--charcoal-900);
  font-family: var(--font-sans);
}

/* Navbar */
.navbar {
  --bs-navbar-padding-y: 0.75rem;
  --bs-navbar-color: var(--charcoal-700);
  --bs-navbar-hover-color: var(--charcoal-900);
  --bs-navbar-active-color: var(--charcoal-900);
  --bs-navbar-brand-color: var(--charcoal-900);
  --bs-navbar-brand-hover-color: var(--charcoal-700);
  background-color: var(--cream-50);
  border-bottom: 1px solid var(--cream-200);
}

.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.navbar-toggler {
  color: var(--charcoal-700);
  border-color: transparent;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(61, 61, 61, 0.25);
}

/* Buttons — dark / outline use the charcoal theme */
.btn-dark {
  --bs-btn-bg: var(--charcoal-900);
  --bs-btn-border-color: var(--charcoal-900);
  --bs-btn-hover-bg: var(--charcoal-800);
  --bs-btn-hover-border-color: var(--charcoal-800);
  --bs-btn-active-bg: var(--charcoal-800);
  --bs-btn-active-border-color: var(--charcoal-800);
  color: var(--cream-50);
}

.btn-outline-dark {
  --bs-btn-color: var(--charcoal-900);
  --bs-btn-border-color: var(--charcoal-900);
  --bs-btn-hover-bg: var(--charcoal-900);
  --bs-btn-hover-border-color: var(--charcoal-900);
  --bs-btn-hover-color: var(--cream-50);
  --bs-btn-active-bg: var(--charcoal-900);
  --bs-btn-active-border-color: var(--charcoal-900);
}

/* Cards */
.bg-create-bg { background-color: var(--cream-50); }
.bg-light {
  --bs-bg-opacity: 1;
  background-color: var(--cream-100) !important;
}
.bg-light-50 { background-color: var(--cream-50) !important; }
.text-body-secondary { color: var(--charcoal-700) !important; }
.text-body-tertiary { color: var(--charcoal-600) !important; }
.text-body-emphasis { color: var(--charcoal-900) !important; }

.card {
  --bs-card-bg: #fff;
  --bs-card-border-color: var(--cream-200);
  --bs-card-color: var(--charcoal-900);
  --bs-card-cap-bg: transparent;
  border-radius: 0.125rem;
}

/* Form controls keep a clean charcoal focus ring */
.form-control,
.form-select {
  border-color: var(--charcoal-300);
  border-radius: 0.125rem;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--charcoal-900);
  box-shadow: 0 0 0 0.15rem rgba(61, 61, 61, 0.25);
}
.form-label {
  color: var(--charcoal-700);
  font-weight: 500;
}

/* Painting images: keep the soft radius + subtle lift from the old theme */
.painting-ratio {
  background-color: var(--cream-100);
  overflow: hidden;
  border-radius: 0.125rem 0.125rem 0 0;
}
.painting-ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.card:hover .painting-ratio img {
  transform: scale(1.02);
}

/* Custom aspect ratios not shipped by Bootstrap (4:5 portrait, 3:4, 16:10) */
.ratio-4x5 { --bs-aspect-ratio: 125%; }
.ratio-3x4 { --bs-aspect-ratio: 133.333333%; }
.ratio-16x10 { --bs-aspect-ratio: 62.5%; }

/* Home carousel keeps the rounded, soft-shadow look of the old theme */
.rounded-carousel {
  border-radius: 0.125rem;
  overflow: hidden;
}
.rounded-carousel .carousel-item img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (min-width: 768px) {
  .rounded-carousel .carousel-item img {
    aspect-ratio: 3 / 4;
  }
}

/* Legacy soft-shadow utility used across pages */
.shadow-soft-lg {
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.28) !important;
}
.rounded-card {
  border-radius: 0.125rem;
}

/* Clamp long descriptions to two lines (was handled by the old theme) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Editorial flourishes — small serif eyebrow labels + hairline dividers
   ========================================================================== */
.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--charcoal-500);
}
.hairline { border-top: 1px solid var(--cream-200); }
.rule-accent {
  height: 2px;
  width: 3rem;
  background: var(--accent);
  display: inline-block;
}
