/* ==========================================================================
   1. Typography & Font Declarations
   ========================================================================== */

@font-face {
  font-family: 'IvyPresto Display';
  src: url('../assets/fonts/IvyPrestoDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IvyPresto Display';
  src: url('../assets/fonts/IvyPrestoDisplay-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IvyPresto Display';
  src: url('../assets/fonts/IvyPrestoDisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'AWConqueror Std Sans';
  src: url('../assets/fonts/AWConquerorStdSans-Light.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* ==========================================================================
   2. Design Tokens & CSS Custom Properties
   ========================================================================== */

:root {
  --bg-color: #F1EADA;
  --text-dark: #110A05; /* High-contrast dark brown for crisp readability */
  --text-muted: #3D2D22;
  --accent-brown: #9E7D65;
  --card-bg: rgba(255, 255, 255, 0.7);

  --font-main: 'AWConqueror Std Sans', sans-serif;
  --font-heading: 'IvyPresto Display', serif;
}


/* ==========================================================================
   3. Base & Global Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: var(--font-main);
  padding: 30px 20px;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}


/* ==========================================================================
   4. Top Header & Logo
   ========================================================================== */

.top-header {
  margin-bottom: 50px;
}

.top-header .logo {
  max-width: 130px;
  height: auto;
  display: block;
}


/* ==========================================================================
   5. Main 4-Column Grid Layout
   ========================================================================== */

.main-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

.edits-wrapper {
  display: contents;
}

.loading-state {
  grid-column: 1 / 4;
  text-align: center;
  padding: 60px 0;
  font-size: 1.1rem;
  color: var(--text-dark);
}


/* ==========================================================================
   6. Column 4: Right Side Column (Artwork Details + Form)
   ========================================================================== */

.right-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
}

.artwork-info-card {
  padding-bottom: 10px;
}

.artwork-title {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.artwork-subtitle {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.customer-ref {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}


/* ==========================================================================
   7. Cards Styling (Edit Cards & Form Card)
   ========================================================================== */

.edit-card,
.form-card {
  background: var(--card-bg);
  padding: 22px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.edit-card:hover,
.form-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(17, 10, 5, 0.08);
}

.edit-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 16px 0 8px;
  letter-spacing: -0.2px;
}

.edit-desc {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.edit-details {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.edit-price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.edit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ==========================================================================
   8. Image Carousel / Swiper Custom Styles (FULL-BLEED IMAGE)
   ========================================================================== */

.edit-image {
  position: relative;
  border-radius: 0;
  /* Negative margin pulls the image full bleed to card's top, left, and right edges */
  margin: -22px -22px 16px -22px;
  width: calc(100% + 44px);
}

.edit-swiper {
  width: 100%;
  height: 400px; /* Dominant image height */
  border-radius: 0;
  position: relative;
  overflow: hidden; /* Clips slide images neatly */
}

.edit-swiper .swiper-wrapper {
  height: 100%;
}

.edit-swiper .swiper-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #EFE8D8;
}

.edit-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* Circular navigation arrows positioned cleanly inside full-bleed image */
.edit-image .swiper-button-next,
.edit-image .swiper-button-prev {
  color: var(--text-dark);
  background: #FFFFFF;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
  z-index: 10;
  top: 50%;
  margin-top: -17px;
}

/* Positioned inside image boundaries to prevent overlapping neighbor cards */
.edit-image .swiper-button-prev {
  left: 12px;
}

.edit-image .swiper-button-next {
  right: 12px;
}

.edit-image .swiper-button-next:hover,
.edit-image .swiper-button-prev:hover {
  background: var(--text-dark);
  color: #FFFFFF;
  transform: scale(1.1);
}

.edit-image .swiper-button-next::after,
.edit-image .swiper-button-prev::after {
  font-size: 12px;
  font-weight: bold;
}

/* Dots Pagination */
.edit-swiper .swiper-pagination {
  bottom: 10px !important;
}

.edit-swiper .swiper-pagination-bullet {
  background: var(--text-dark);
  opacity: 0.4;
}

.edit-swiper .swiper-pagination-bullet-active {
  background: var(--text-dark);
  opacity: 1;
}


/* ==========================================================================
   9. Buttons & Interactive Links
   ========================================================================== */

.btn-select {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background-color: var(--text-dark);
  color: #FFFFFF;
  padding: 14px 20px;
  text-decoration: none;
  text-align: center;
  border-radius: 0;
  border: 1px solid var(--text-dark);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.btn-select:hover {
  background-color: var(--accent-brown);
  border-color: var(--accent-brown);
}

.btn-select .btn-arrow,
.btn-submit .btn-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.btn-select:hover .btn-arrow,
.btn-submit:hover .btn-arrow {
  transform: translateX(4px);
}

.link-customize {
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-align: center;
  transition: color 0.2s ease;
}

.link-customize:hover {
  color: var(--accent-brown);
}


/* ==========================================================================
   10. Form Card Styling (AUTO-SHRINK CONTAINER & BASELINE ALIGNED)
   ========================================================================== */

.right-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes form card to bottom to lock button alignment */
  height: 100%;
}

.artwork-info-card {
  margin-bottom: 15px;
}

.form-card {
  background: var(--card-bg);
  padding: 22px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 12px; /* Tight, compact gap inside form */
  /* REMOVED flex: 1 to allow container height to shrink and wrap content tightly */
  width: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.form-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(17, 10, 5, 0.08);
}

.form-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.form-desc {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-dark);
}

.request-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-group label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group textarea {
  width: 100%;
  height: 120px; /* Clean, comfortable height for short custom notes */
  padding: 10px 12px;
  border: 1px solid #C0B5A2;
  border-radius: 0;
  background: #FFFFFF;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-dark);
  resize: none;
  transition: border-color 0.2s ease;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--text-dark);
}

.form-actions {
  display: flex;
  flex-direction: column;
}

.btn-submit {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background-color: var(--text-dark);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: 0;
  border: none;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.btn-submit:hover {
  background-color: var(--accent-brown);
}

/* Compensates for "Ik wil iets aanpassen ->" link in Cards 1-3 */
.action-spacer {
  height: 30px;
}


/* ==========================================================================
   11. Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1150px) {
  .main-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 680px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Target Scroll Offset Fix (Prevents elements from being hidden under sticky nav)
   ========================================================================== */

/* Add scroll offset to all scroll targets */
#edit-1, 
#edit-2, 
#edit-3, 
#custom-form,
.card,
.edit-card {
  scroll-margin-top: 70px; /* Adjust this value based on your sticky navbar height + breathing room */
}

/* ==========================================================================
   Mobile Quick-Nav Styles (Optimized for Easy Tapping)
   ========================================================================== */

.mobile-quick-nav {
  display: none; /* Hidden by default on Desktop and Tablet */
}

/* ==========================================================================
   Option 2 (Refined): Segmented Control with Rectangular / Sharp Styling
   Matches the existing website button style for design consistency
   ========================================================================== */

.mobile-quick-nav {
  display: none; /* Hidden by default on Desktop and Tablet */
}

/* Target Mobile viewports only (screen width 576px and below) */
@media (max-width: 576px) {
  .mobile-quick-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #F4F4F4; /* Neutral container track */
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid #E0E0E0;
    border-radius: 0px; /* Sharp corners to match overall web style */
  }

  .quick-nav-btn {
    flex: 1;
    text-align: center;
    min-height: 42px; /* Meets mobile touch-target accessibility standards */
    padding: 6px 8px;
    
    /* Inherit main font family & styles */
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #555555;
    
    background: transparent;
    border: none;
    border-radius: 0px; /* Rectangular / Sharp corners */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
  }

  /* Active or Highlighted state styling */
  .quick-nav-btn:active,
  .quick-nav-btn.highlight {
    background: #1A1A1A; /* Primary dark button color */
    color: #FFFFFF;
  }
}

/* Vertical spacing for dimensions line */
.edit-dimensions {
  display: block;      
  margin-top: 6px;     
}

/* ==========================================================================
   Tablet & Mobile Shared Layout & Ordering (< 1150px)
   ========================================================================== */

@media (max-width: 1150px) {
  .main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Unwrap .right-column container so child elements sit directly in grid */
  .right-column {
    display: contents;
  }

  /* 1. Artwork Info Card ALWAYS at the VERY TOP */
  .artwork-info-card {
    order: 1;
    grid-column: 1 / -1; /* Full width on 2-column grid */
    margin-bottom: 10px;
  }

  /* 2. Edit Cards in the MIDDLE */
  .edit-card {
    order: 2;
    grid-column: span 1;
  }

  /* 3. Form Card at the BOTTOM */
  .form-card {
    order: 3;
    grid-column: span 1;
    display: flex;
    flex-direction: column;
  }

  .request-form {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .form-group textarea {
    height: 140px;
  }

  .form-actions {
    margin-top: auto;
  }

  .action-spacer {
    display: block;
    height: 30px;
  }
}

/* ==========================================================================
   Mobile-Specific Overrides (< 680px)
   ========================================================================== */

@media (max-width: 680px) {
  .main-grid {
    grid-template-columns: 1fr; /* Single column stack for mobile */
  }

  .artwork-info-card,
  .edit-card,
  .form-card {
    grid-column: auto; /* Reset column spans */
  }

  .artwork-title {
    font-size: 2.5rem;
  }

  /* Hide spacer on mobile vertical stack */
  .action-spacer {
    display: none;
  }
}

