/**
 * Modern Simple CSS - For 4 Music Publisher Sites
 * Clean, accessible design 
 * =================================================================
 * TABLE OF CONTENTS
 * =================================================================
 * 1. CSS VARIABLES - Site-specific colors
 * 2. RESET & BASE
 * 3. CONTAINER - Full width responsive
 * 4. SITE HEADER - Solid color band: logo + email pill + action pills
 * 5. SITE HEADER - Responsive breakpoints
 * 6. HERO SEARCH SECTION - Transform sidebar to hero
 * 7. MAIN CONTENT AREA
 * 8. TABLES
 * 9. FORMS
 * 10. PRODUCT LISTINGS
 * 11. FOOTER - Dark modern footer
 * 12. RESPONSIVE DESIGN
 * 13. UTILITY CLASSES
 * 14. ACCESSIBILITY
 * 15. PRINT STYLES
 */

/* =================================================================
   1. CSS VARIABLES - Site-specific colors
   ================================================================= */
   :root {
    /* Default colors */
    --primary: #007A33;
    --hero-bg: #F9F9FB;
    --text-dark: #333333;
    --text-body: #555555;
    --background: #FFFFFF;
    --border: #DDDDDD;
    --footer-bg: #007A33;
    --footer-text: #FFFFFF;
      /* Add light/secondary colors */
    --primary-gradient: #006629;
    --accent-gradient: #007A33;

    /* Display font */
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  
    /* Typography */
    --font-base: 18px;
    --font-large: 20px;
    --font-xlarge: 24px;
    --font-xxlarge: 32px;
    --line-height: 1.7;

    /* Hero typography - responsive variables */
    --hero-title-size: 36px;
    --hero-subtitle-size: 20px;
    --hero-padding: 80px;
    --hero-max-width: 700px;

    /* Spacing */
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Layout */
    --max-width: 1300px;
  }
  
  /* Site-specific color themes */
  body.site-kalmus {
    --primary: #285f2f;
    --hero-bg: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 50%, #D3D3D3 100%);
    --silver: #C0C0C0;
    --metallic-grey: #808080;
    --dark-grey: #434343;
    --light-bg: #E8E8E8;
    --primary-gradient: #1f4a25;
    --accent-gradient: #285f2f;
  }
  
  body.site-thompsonedition {
    --primary: #27406F;
    --hero-bg: #F9F9FB;
  }
  
  body.site-musicarara {
    --primary: #391A54;
    --hero-bg: #F9F9FB;
  }
  
  body.site-brasspress {
    --primary: #C5A22B;
    --hero-bg: #FFFEF0;
  }
  
  /* Additional sites */
  body.site-margun {
    --primary: #8B4513;
    --hero-bg: #FFF5F0;
  }
  
  body.site-alphonseleduc {
    --primary: #4B0082;
    --hero-bg: #F9F9FB;
  }
  
  body.site-baerenreiter {
    --primary: #006B3C;
    --hero-bg: #F9F9FB;
  }
  
  body.site-hamelle {
    --primary: #DC143C;
    --hero-bg: #FFF0F3;
  }
  
 /* =================================================================
   2. RESET & BASE
   ================================================================= */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    font-size: var(--font-base);
  }
  
  body {
    font-family: var(--font-display);
    font-size: var(--font-base);
    line-height: var(--line-height);
    color: var(--text-body);
    background: var(--background);
    margin: 0;
    padding: 0;
  }
  
 /* =================================================================
   3. CONTAINER - Full width responsive
   ================================================================= */
  #container,
  .site-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--background) !important;
    background-image: none !important;
    border: none !important;
    position: relative;
    overflow: clip;
  }

  
 /* =================================================================
   4. SITE HEADER - Solid color band: logo + email pill + action pills
   ================================================================= */
  .site-header {
    background: var(--primary);
    color: #fff;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  }

  .site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 40px;
    display: grid;
    /* Equal-width side columns (1fr ... 1fr) keep the centre column symmetric
       about the window centre, so the email button / condensed search sit on the
       true horizontal centre of the page rather than being centred between the
       logo's right edge and the actions' left edge (which differ in width). */
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
  }

  /* Brand (logo) */
  .site-header-brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    text-decoration: none;
    color: inherit;
  }

  .site-header-brand-img {
    display: block;
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
  }

  .site-header-brand-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
  }

  /* White pill buttons */
  .site-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    white-space: nowrap;
  }

  .site-header-pill:hover,
  .site-header-pill:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    color: var(--primary);
  }

  /* Pill icons are masked silhouettes tinted with the site's feature color
     (var(--primary)) so they theme per brand instead of being baked green. */
  .site-header-pill-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: inline-block;
    background-color: var(--primary);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  .site-header-pill-icon--email {
    -webkit-mask-image: url("/images/icon-email-green.png");
    mask-image: url("/images/icon-email-green.png");
  }
  .site-header-pill-icon--home {
    -webkit-mask-image: url("/images/icon-home-green.png");
    mask-image: url("/images/icon-home-green.png");
  }
  .site-header-pill-icon--cart {
    -webkit-mask-image: url("/images/icon-cart-green.png");
    mask-image: url("/images/icon-cart-green.png");
  }

  /* Email pill (center column) */
  .site-header-email {
    justify-self: center;
    max-width: 520px;
  }

  /* Right-side action group - stacked vertically per client design.
     justify-self:end pins it to the right edge of its (now 1fr) grid column so
     the pills keep their content width instead of stretching to fill 1fr. */
  .site-header-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-self: end;
    gap: 8px;
  }

  /* Minimal header for SIMPLE_PAGE_ONLY pages */
  .site-header-minimal {
    min-height: 80px;
  }

 /* =================================================================
   5. SITE HEADER - Responsive breakpoints (1280 / 768 / 375)
   ================================================================= */
  /* Tablet: between mobile and full desktop */
  @media (max-width: 1279px) {
    .site-header-inner {
      padding: 24px;
      gap: 24px;
    }
    .site-header-brand-img {
      height: 56px;
      max-width: 200px;
    }
    .site-header-pill {
      font-size: 10px;
      padding: 10px 18px;
    }
    .site-header-pill-icon {
      width: 20px;
      height: 20px;
    }
  }

  /* Mobile: stack into 2 rows */
  @media (max-width: 767px) {
    .site-header-inner {
      grid-template-columns: 1fr auto;
      grid-template-rows: auto auto;
      padding: 24px;
      gap: 24px;
    }
    .site-header-brand        { grid-column: 1; grid-row: 1; }
    .site-header-actions      { grid-column: 2; grid-row: 1; flex-direction: row; align-items: center; gap: 8px; }
    .site-header-email {
      grid-column: 1 / -1;
      grid-row: 2;
      justify-self: stretch;
      max-width: none;
      justify-content: center;
    }
    .site-header-brand-img {
      height: 44px;
      max-width: 160px;
    }
    .site-header-pill {
      font-size: 10px;
      padding: 8px 14px;
    }
  }

  /* Small mobile (~375px): hide labels on Home/Cart, keep icons */
  @media (max-width: 480px) {
    .site-header-actions .site-header-pill span:not(.site-header-pill-icon) { display: none; }
    .site-header-actions .site-header-pill { padding: 10px; }
    .site-header-actions .site-header-pill-icon {
      width: 22px;
      height: 22px;
      background-color: var(--primary);
    }
  }


 /* =================================================================
   5b. SITE SEARCH - Sheet-music background band with input + button
   ================================================================= */
  .site-search {
    background-image: url('/images/bg-sheet-music.jpg');
    background-size: cover;
    background-position: center -50px;
    background-repeat: no-repeat;
    padding: 100px 40px;
    border-bottom: 1px solid #cecdcc;
  }

  .site-search-form {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 0;
    align-items: stretch;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-radius: 10px;
  }

  .site-search-input {
    flex: 1;
    background: #fff;
    border: 1px solid #cecdcc;
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 16px 20px;
    font-family: var(--font-display);
    font-size: 16px;
    color: #1a1a1a;
    outline: none;
  }

  .site-search-input::placeholder {
    color: #8a8a8a;
  }

  .site-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(40, 95, 47, 0.15);
  }

  .site-search-button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 10px 10px 0;
    padding: 0 28px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    transition: background 0.15s ease;
  }

  .site-search-button:hover,
  .site-search-button:focus-visible {
    filter: brightness(0.85);
  }

  .site-search-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  /* TE-182: animated example overlay ("typewriter text rotator") over the input */
  .site-search-input-wrap {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
  }
  .site-search-input-wrap .site-search-input {
    flex: 1;
    width: 100%;
    border-radius: 10px 0 0 10px;
  }
  .site-search-typewriter {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.5;
    color: #8a8a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-search-typewriter.stw--pending,
  .site-search-typewriter.stw--hidden {
    display: none;
  }
  .stw-caret {
    display: inline-block;
    width: 0;
    height: 1.1em;
    border-left: 1px solid currentColor;
    margin-left: 2px;
    vertical-align: -0.15em;
    animation: stw-blink 1.06s steps(2, start) infinite;
  }
  @keyframes stw-blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .stw-caret { animation: none; }
  }

  /* Tablet -- scoped to the hero band (.site-search) so these do NOT leak into
     the TE-175 compact header search, which shares the .site-search-* classes. */
  @media (max-width: 1023px) {
    .site-search {
      padding: 40px 24px;
    }
    .site-search .site-search-input,
    .site-search .site-search-button {
      font-size: 14px;
    }
    .site-search .site-search-input { padding: 14px 16px; }
    .site-search .site-search-button { padding: 0 20px; }
    .site-search .site-search-typewriter { left: 16px; right: 16px; font-size: 14px; }
  }

  /* Mobile (<=480px): stack input above button (each gets full radius). Scoped to
     the hero band so the compact header search stays a horizontal pill. */
  @media (max-width: 480px) {
    .site-search {
      padding: 24px 16px;
    }
    .site-search .site-search-form {
      flex-direction: column;
      gap: 12px;
      box-shadow: none;
    }
    .site-search .site-search-input-wrap {
      flex: 0 0 auto;
      width: 100%;
    }
    .site-search .site-search-input {
      border-right: 1px solid #cecdcc;
      border-radius: 10px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }
    .site-search .site-search-input-wrap .site-search-input {
      border-radius: 10px;
    }
    .site-search .site-search-button {
      border-radius: 10px;
      padding: 12px 20px;
      justify-content: center;
    }
  }


 /* =================================================================
   6. HERO SEARCH SECTION - Transform sidebar to hero
   ================================================================= */
  #sidebar_left,
  .sidebar-left {
    position: relative !important;
    float: none !important;
    width: 100% !important;
    min-height: 450px !important;
    /* background: var(--hero-bg) !important; */
    padding: 60px 40px !important;
    margin: 0 !important;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    overflow: hidden;
    /* border-bottom: 2px solid #D0D0D0; */
    border-bottom: 2px solid #000;
  }
  
  /* Hide right sidebar */
  #sidebar_right {
    display: none !important;
  }

  /* Hero section layouts */
  #sidebar_left .hero-title {
    font-family: var(--font-display);
    font-size: var(--hero-title-size) !important;
    font-weight: 600 !important;
    color: #000000c6 !important;
    margin: 0 !important;
    margin-bottom: var(--space-lg) !important;
    line-height: 1.5;
    text-align:center !important;
    max-width: 800px;
  }

  #sidebar_left .hero-subtitle {
    font-size: var(--hero-subtitle-size) !important;
    color: var(--text-body) !important;
    margin-bottom: var(--space-xl) !important;
    max-width: 100%;
    margin:0 40px !important;
    margin-left: auto;
    text-align:center;
    margin-right: auto;
  }

  /* highlight the hero title */
  #sidebar_left .hero-title-highlight {
    color: var(--primary);
    font-weight: 600;
    font-size: inherit; 
  }

  /* hero background gradient */
  #sidebar_left .hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    /* background-image:
      radial-gradient(circle at 20% 50%, var(--primary-gradient) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, var(--accent-gradient) 0%, transparent 50%),
      radial-gradient(circle at 40% 20%, var(--primary-gradient) 0%, transparent 50%); */
  }

  /* Kalmus-specific: Sheet music background pattern */
  body.site-kalmus #sidebar_left .hero-bg-pattern {
    /* background-image: url('../image003.png'); */
    background-repeat: repeat;
    background-size: 600px auto;
    opacity: 0.12;
    filter: grayscale(100%);
  }

  /* Kalmus-specific: Reduce hero title size (logo should be more prominent) */
  body.site-kalmus #sidebar_left .hero-title {
    font-size: 36px !important;
    font-weight: 500 !important;
    color: var(--dark-grey) !important;
  }

  body.site-kalmus #sidebar_left .hero-subtitle {
    font-size: 18px !important;
    color: var(--metallic-grey) !important;
  }

  /* ensure text stays above pattern */
  #sidebar_left .hero-title,
  #sidebar_left .hero-subtitle,
  #sidebar_left #searchbox {
    position: relative;
    z-index: 1;
  }
  
  /* Hide original search title */
  #searchbox p {
    display: none !important;
  }
  
    /* Search form */
  #searchbox form {
    display: flex !important;
    flex-direction: row !important;
    gap: var(--space-sm) !important;
    justify-content: center;
    align-items: center !important;
    padding: 10px !important;
    border-radius: 8px !important;
    margin: 0 auto;
  }

  #searchbox input[type="text"]:focus {
    outline: none !important;
  }

    /* Input flex behavior */
  #searchbox input[type="text"] {
    flex: 1 !important;
    padding: var(--space-sm) var(--space-md) !important;
    font-size: var(--font-medium) !important;
    border: 1px solid #aaaaaa;
    padding: 14px !important;
    border-radius: 6px;
  }
  #searchbox input[type="text"]::placeholder {
    color: #aaaaaa !important;
  }

  /* Button size adjustment */
  #searchbox .searchbutton {
    flex-shrink: 0 !important;
    font-size: var(--font-medium) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  #searchbox .searchbutton svg {
    vertical-align: middle;
  }

  a#CTA-button {
    font-family: var(--font-display);
    padding: .8em 3em;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    margin-top: 2em;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    z-index: 10;
    transition: background 0.2s ease;
}

a#CTA-button:hover {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

  /* Responsive mobile hero */
  @media (max-width: 767px) {
    :root {
      --hero-title-size: 32px;
      --hero-subtitle-size: 16px;
      --hero-padding: 40px 20px;
      --hero-max-width: 100%;
    }
    
    #sidebar_left,
    .sidebar-left {
      min-height:0;
    }

    #sidebar_left .hero-title {
      line-height: 1.2 !important;
      margin-bottom: var(--space-md) !important;
    }

    #sidebar_left .hero-subtitle {
      margin-bottom: var(--space-lg) !important;
    }

    #searchbox {
      max-width: 90% !important; 
      margin: 0 auto !important;
    }
  
    #searchbox input[type="text"] {
      font-size: var(--font-small) !important;
      padding: var(--space-sm) !important;
    }
  
    #searchbox .searchbutton {
      font-size: var(--font-small) !important;
      padding: var(--space-sm) var(--space-md) !important;
    }
  }

  /* Responsive tablet hero */
  @media only screen and (min-width: 768px) and (max-width: 1023px) {
    :root {
      --hero-title-size: 36px;
      --hero-subtitle-size: 18px;
      --hero-padding: 60px 40px;
      --hero-max-width: 600px;
    }
    
    #sidebar_left,
    .sidebar-left {
      min-height:0;
    }

    #navcontainer {
      padding: var(--space-md) 40px !important;
    }

    #navcontainer .nav-logo-container a {
      font-size: 36px !important;
    }
  }

  /* Responsive desktop hero */
  @media only screen and (min-width: 1024px) and (max-width: 1439px) {
    :root {
      --hero-title-size: 36px;
      --hero-subtitle-size: 20px;
      --hero-padding: 100px 80px;
      --hero-max-width: 800px;
    }

    #searchbox {
      padding: var(--space-xxl) var(--space-lg) !important;
    }
  }
  
 /* =================================================================
   7. MAIN CONTENT AREA
   ================================================================= */
  #center,
  .content-wrapper {
    max-width: var(--max-width) !important;
    margin: 0 auto !important;
    padding: var(--space-xxl) !important;
    background: var(--background) !important;
  }
  
  #main,
  .main-content {
    background: var(--background) !important;
    padding: var(--space-lg) !important;
    line-height: var(--line-height) !important;
  }

  /* Mobile + tablet: remove main content padding */
  @media (max-width: 1023px) {
    #main,
    .main-content {
      padding: 0 !important;
    }
  }

  /* Content typography */
  #main h1,
  #center h1 {
    font-family: var(--font-display);
    font-size: var(--font-xxlarge);
    color: var(--text-dark);
    margin-bottom: var(--space-xl);
    text-align: center;
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--primary);
  }
  
  #main h2,
  #center h2 {
    font-family: var(--font-display);
    font-size: var(--font-xlarge);
    color: var(--text-dark);
    margin: var(--space-xl) 0 var(--space-lg) 0;
  }
  
  #main h3,
  #center h3 {
    font-family: var(--font-display);
    font-size: var(--font-large);
    color: var(--text-dark);
    margin: var(--space-lg) 0 var(--space-md) 0;
  }
  
  #main p,
  #center p {
    margin-bottom: var(--space-md);
    line-height: var(--line-height);
    max-width: 800px;
    /* margin-left: auto; */
    margin-right: auto;
  }
  
  #main a,
  #center a {
    color: var(--primary);
    text-decoration: underline;
  }
  
  #main a:hover,
  #center a:hover {
    color: var(--primary);
    opacity: 0.8;
  }
  
 /* =================================================================
   8. TABLES
   ================================================================= */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  th {
    background: var(--primary);
    color: white;
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-base);
  }
  
  td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    font-size: var(--font-base);
  }
  
  tr:hover {
    background: #f9f9f9;
  }

  /* Order invoice (order_status.php) is a layout table, not a data table.
     Strip the data-table chrome so items don't get separator lines / heavy
     padding / row shadows. The print & email invoices are unaffected. */
  .order-invoice table {
    box-shadow: none;
    background: transparent;
    margin: 0;
  }
  .order-invoice td {
    border-bottom: none;
    padding: 2px 6px;
  }
  .order-invoice tr:hover {
    background: transparent;
  }

 /* =================================================================
   9. FORMS
   ================================================================= */
  button,
  input[type="submit"],
  input[type="button"] {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: var(--font-base);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: .5em 2em;
    border: 2px solid transparent;
  }
  
  button:hover,
  input[type="submit"]:hover,
  input[type="button"]:hover {
    opacity: 0.9;
    background: white;
    color: var(--primary);
    border-color: var(--primary);
  }
  
  label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-dark);
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: var(--font-base);
    color: var(--text-dark);
    background: #fff;
    box-sizing: border-box;
  }

  input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="tel"]:focus,
  input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
  }

 /* =================================================================
   10. PRODUCT LISTINGS
   ================================================================= */
  .product-listing,
  .product-item,
  #product_entry {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
  }

  .product-listing:hover,
  .product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--primary);
  }

  .product-title,
  #pd_prod_name {
    font-size: var(--font-large);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-md);
  }

  .product-price,
  #pd_pricing {
    font-size: var(--font-xlarge);
    font-weight: bold;
    color: var(--primary);
  }


 /* =================================================================
   10c. SEARCH RESULTS PAGE - Result list, Details/Cart buttons, pagination
   ================================================================= */

  /* The result count line (h1 + the first <p> from search.php) */
  #main h1 + p,
  #center h1 + p {
    color: #444;
    margin: 0 0 24px;
  }

  /* search.php wraps each show_product() in <p> - the browser auto-closes
     the <p> before the result <div>, leaving empty <p> tags. Hide them. */
  #main p:empty,
  #center p:empty {
    display: none;
  }

  /* Search result row - card baseline (inherits from .product-listing block above) */
  #product_entry {
    font-family: var(--font-display);
    color: #1a1a1a;
    margin-bottom: 14px;
    line-height: 1.6;
  }

  #product_entry:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
  }

  #product_entry a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
  }

  #product_entry a:hover {
    text-decoration: underline;
  }

  #product_description {
    font-size: 14px;
    color: #555;
    margin-top: 8px;
  }

  #product_description p { margin: 4px 0; }

  /* Bottom row of each result: price + action button */
  #product_order {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
  }

  #product_order form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
  }

  /* Inline price text (non-score items) */
  #product_order:not(:has(form)),
  #product_order > :first-child:not(form) {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 16px;
  }

  /* Action buttons inside result rows - small "Details" pill (with info icon)
     and "Add to cart" pill for non-score items */
  #product_order input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
    transition: filter 0.15s ease;
  }

  #product_order input[type="submit"]:hover,
  #product_order input[type="submit"]:focus-visible {
    filter: brightness(0.85);
    background: var(--primary);
    color: #fff;
    border-color: transparent;
  }

  /* "Details" button gets the info icon on the left */
  .product-details-btn,
  #product_order input.product-details-btn[type="submit"] {
    background-image: url('/images/icon-info-white.png');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 13px;
    padding-left: 30px;
  }

  .product-details-btn:hover,
  .product-details-btn:focus-visible,
  #product_order input.product-details-btn[type="submit"]:hover {
    background-image: url('/images/icon-info-white.png');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 13px;
  }

  /* Pagination - "Showing items / Page / Previous 1 2 3 Next / Limit N per page"
     The whole block is rendered inside ONE unclosed <p> from
     show_navigation_options(), with <br> separating the three lines. We scope to
     direct children of #main > p so we don't style <b>/<strong> in result
     descriptions. The <p> also contains a <select> for the per-page limit. */
  #main > p:has(> a[href*="sr="]),
  #main > p:has(> select[name="limit"]) {
    line-height: 3;
    margin: 32px 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #555;
    font-size: 14px;
  }

  #main > p > a[href*="sr="] {
    display: inline-block;
    min-width: 32px;
    padding: 6px 10px;
    margin: 0 2px;
    color: var(--primary);
    background: #fff;
    border: 1px solid #cecdcc;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
  }

  #main > p > a[href*="sr="]:hover,
  #main > p > a[href*="sr="]:focus-visible {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  /* Current page is rendered by show_cur_page() as <b>$page</b> (direct
     child of the pagination <p>); style it as the active page chip. */
  #main > p:has(> a[href*="sr="]) > b,
  #main > p:has(> select[name="limit"]) > b {
    display: inline-block;
    min-width: 32px;
    padding: 6px 10px;
    margin: 0 2px;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
  }

  /* Per-page limit dropdown inside the pagination <p>. */
  #main > p > select[name="limit"] {
    display: inline-block;
    padding: 6px 28px 6px 10px;
    margin: 0 6px;
    font-family: var(--font-display);
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #cecdcc;
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23555' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
  }

  #main > p > select[name="limit"]:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(40, 95, 47, 0.15);
  }

  /* Failed-search contact form */
  form[action="search_report.php"] {
    background: #fff;
    border: 1px solid #cecdcc;
    border-radius: 10px;
    padding: 24px;
    margin: 20px 0;
  }

  form[action="search_report.php"] table {
    box-shadow: none;
    margin: 0;
  }

  form[action="search_report.php"] td {
    padding: 8px 12px;
    border-bottom: none;
  }

  form[action="search_report.php"] input[type="text"],
  form[action="search_report.php"] textarea {
    border: 1px solid #cecdcc;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: var(--font-display);
    font-size: 14px;
    width: 100%;
    max-width: 400px;
  }

  /* Mobile: tighten result cards */
  @media (max-width: 767px) {
    #product_entry {
      padding: 16px;
    }
    #product_order {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
    #product_order input[type="submit"] {
      width: 100%;
      max-width: 240px;
    }
  }


 /* =================================================================
   10b. PRODUCT DETAIL PAGE - Score multi-pricing layout per OST #970697
   ================================================================= */
  #pd_prod_name {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
  }

  #pd_composer {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
    padding-bottom: 16px;
    border-bottom: 1px solid #cecdcc;
    margin-bottom: 16px;
  }

  #pd_instrumentation {
    font-family: var(--font-display);
    font-size: 16px;
    color: #444;
    margin-bottom: 32px;
  }

  #pd_product_code {
    font-family: var(--font-display);
    font-size: 16px;
    color: #444;
    /* margin-bottom: 32px;
    display: inline-block;
    /*
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 5px 10px;
    border: 1px solid #cecdcc;
    border-radius: 4px;
    background: #f8f8f8;
    margin-bottom: 12px;
    
    */
  }

  /* Score product: center the item code label above the table */
  #pd_multi_pricing {
    text-align: center;
  }

  #pd_multi_pricing .pd_score_table {
    text-align: left;
  }

  /* Single-price product: center item code, bold price, stack above button */
  #pd_single_pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 8px;
  }

  #pd_single_product_price {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 10px 0 8px;
  }

  #pd_add_single_product_cart_button input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s ease;
  }

  #pd_add_single_product_cart_button input[type="submit"]:hover,
  #pd_add_single_product_cart_button input[type="submit"]:focus-visible {
    filter: brightness(0.85);
  }

  .pd_score_table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    box-shadow: none;
    margin: 0 0 32px;
  }

  .pd_score_table tr {
    background: transparent;
  }
  .pd_score_table tr:hover {
    background: transparent;
  }

  .pd_score_table td {
    padding: 8px 12px;
    border-bottom: none;
    vertical-align: middle;
    background: transparent;
    font-size: 16px;
  }

  .pd_score_table td:first-child {
    width: 100px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: left;
    padding-left: 0;
  }

  .pd_score_table td:nth-child(2) {
    width: 200px;
  }

  /* Description cell — always the last column; last-child (not nth-child(3))
     survives the stray hidden <input> that single-part solo rows inject. */
  .pd_score_table td:last-child {
    font-weight: 600;
    color: #1a1a1a;
  }

  /* Add to Cart button — green pill with white cart icon */
  .pd_score_table input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px 12px 56px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    /* Lucide shopping-cart + circle-plus badge, combined into one inline SVG (white stroke, ISC license). */
    --icon-cart-plus: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><g transform='translate(-1 1.5) scale(0.85)'><circle cx='8' cy='21' r='1'/><circle cx='19' cy='21' r='1'/><path d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/></g><g transform='translate(13.9 -0.9) scale(0.46)'><circle cx='12' cy='12' r='10'/><path d='M8 12h8'/><path d='M12 8v8'/></g></svg>");
    background-image: var(--icon-cart-plus);
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 24px;
    transition: filter 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  }

  .pd_score_table input[type="submit"]:hover,
  .pd_score_table input[type="submit"]:focus-visible {
    filter: brightness(0.85);
    background: var(--primary);   /* keep solid; override generic button:hover white swap */
    color: #fff;
    border-color: transparent;
    background-image: var(--icon-cart-plus);
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 24px;
  }

  /* Embedded select inside an "extra part" row */
  .pd_score_table select {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #cecdcc;
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
    font-family: var(--font-display);
    font-size: 15px;
    min-width: 120px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231a1a1a' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    margin-left: 8px;
  }

  /* Long description below the pricing table */
  #pd_page_description {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
    margin-top: 24px;
  }

  #pd_page_contents p {
    margin: 0 0 12px;
  }

  #pd_page_contents a {
    color: var(--primary);
    text-decoration: underline;
  }

  #pd_prod_image {
    margin-bottom: 16px;
  }

  #pd_prod_image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
  }

  /* Tablet/mobile: stack price/button/description vertically */
  @media (max-width: 767px) {
    #pd_prod_name { font-size: 26px; }
    #pd_composer { font-size: 16px; }
    #pd_instrumentation { font-size: 14px; }

    .pd_score_table,
    .pd_score_table tbody,
    .pd_score_table tr,
    .pd_score_table td {
      display: block;
      width: 100%;
    }
    .pd_score_table tr {
      padding: 16px 0;
      border-bottom: 1px solid #cecdcc;
    }
    .pd_score_table td {
      padding: 4px 0;
    }
    .pd_score_table td:first-child {
      width: auto;
      font-size: 20px;
    }
    .pd_score_table td:nth-child(2) {
      width: auto;
    }
    .pd_score_table input[type="submit"] {
      width: 100%;
      max-width: 240px;
    }
  }


 /* =================================================================
   10d. CART PAGE - Currency selector + quantity input
   ================================================================= */
  /* "Currency:" selector in the top form (show_currency_options output) */
  form[name="top_currency_form"] select[name="currency"] {
    font-family: var(--font-display);
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #cecdcc;
    border-radius: 6px;
    padding: 8px 32px 8px 12px;
    margin-left: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23555' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
  }

  form[name="top_currency_form"] select[name="currency"]:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  }

  /* Per-line quantity input in the cart table (name="quantity_<id>") */
  form[name="cart_options"] input[type="text"][name^="quantity_"] {
    width: 56px;
    padding: 8px 10px;
    font-family: var(--font-display);
    font-size: 14px;
    text-align: center;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #cecdcc;
    border-radius: 6px;
  }

  form[name="cart_options"] input[type="text"][name^="quantity_"]:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  }

 /* =================================================================
   11. FOOTER - Action buttons over sheet-music + dark green band
   ================================================================= */

  /* Reset outer container - sections now manage their own padding/background */
  #footer.site-footer {
    display: block;
    padding: 0;
    border-top: none;
    background-color: transparent;
    text-align: left;
  }

  /* Top section: sheet-music background with action buttons */
  .footer-actions {
    background-image: url('/images/bg-sheet-music.jpg');
    background-size: cover;
    background-position: center bottom -30px;
    background-repeat: no-repeat;
    padding: 56px 0;
  }

  /* TE-184: match the header's content box (max-width + 40px side padding) so the
     footer's left/right edges line up with the header. Buttons wrap centered,
     which stays symmetric for 5 OR 6 (3 per row, last row centered). */
  .footer-actions-list {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .footer-actions-list li {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 1 300px;
    max-width: 300px;
  }

  .footer-actions-list a {
    display: block;
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 16px 20px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: background 0.15s ease, transform 0.15s ease;
  }

  .footer-actions-list a:hover,
  .footer-actions-list a:focus-visible {
    filter: brightness(0.85);
    transform: translateY(-1px);
    color: #fff;
  }

  /* Bottom section: dark green band -- a single row [logo · copyright · controls]
     (TE-184), sized to roughly the header height and aligned to the header's
     content box. Everything vertically centred. */
  .footer-band {
    background: var(--primary);
    color: #fff;
    padding: 0;
  }

  .footer-band-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px 40px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
  }

  .footer-band-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
  }

  .footer-band-logo-img {
    display: block;
    height: auto;
    width: auto;
    max-width: 180px;
    max-height: 56px;
    object-fit: contain;
  }

  .footer-band-logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
  }

  /* Country/currency controls — one shared 2-col grid so both rows align */
  .footer-band-controls {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 12px;
    row-gap: 12px;
    align-items: center;
    margin: 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: 14px;
  }

  .footer-band-control {
    display: contents;
  }

  .footer-band-control-label {
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
  }

  .footer-band-controls select {
    background: #fff;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    padding: 8px 36px 8px 12px;
    font-family: var(--font-display);
    font-size: 14px;
    min-width: 160px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231a1a1a' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
  }

  /* Language selector hidden per current design spec; markup retained for state */
  .footer-band-language {
    display: none;
  }

  /* TE-184: copyright is the middle cell of the band row (desktop), centred */
  .footer-band-copyright {
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
  }

  .footer-band-copyright a {
    color: #fff;
    text-decoration: underline;
  }

  /* Tablet */
  /* TE-184: mirror the HEADER's breakpoint (side padding drops to 24px at <=1279)
     so header and footer left/right edges stay aligned in the 1024-1279 range. */
  @media (max-width: 1279px) {
    .footer-actions {
      padding: 40px 0;
    }
    .footer-actions-list {
      padding: 0 24px;
    }
    .footer-actions-list a {
      padding: 14px 16px;
      font-size: 14px;
    }
    .footer-band-inner {
      padding: 16px 24px;
    }
    .footer-band-logo-img {
      max-width: 160px;
      max-height: 48px;
    }
  }

  /* Small tablet / large mobile: stack the band; copyright drops BELOW (it is
     only between logo and controls on desktop). */
  @media (max-width: 767px) {
    .footer-band-inner {
      grid-template-columns: 1fr;
      justify-items: center;
      gap: 20px;
      text-align: center;
    }
    .footer-band-logo      { order: 1; }
    .footer-band-controls  { order: 2; align-items: center; }
    .footer-band-copyright { order: 3; }
  }

  /* Mobile: buttons go full width, one per row */
  @media (max-width: 480px) {
    .footer-actions {
      padding: 32px 0;
    }
    .footer-actions-list {
      padding: 0 24px;
      gap: 10px;
    }
    .footer-actions-list li {
      flex: 1 1 100%;
      max-width: none;
    }
    .footer-band-inner {
      padding: 20px 24px;
    }
    .footer-band-controls select {
      min-width: 140px;
    }
  }


 /* =================================================================
   13. UTILITY CLASSES
   ================================================================= */
  .text-center {
    text-align: center;
  }
  
  .hidden {
    display: none !important;
  }
  
  /* =================================================================
   14. ACCESSIBILITY
   ================================================================= */
  a:focus,
  button:focus,
  input:focus,
  select:focus {
    outline: 0 solid var(--primary);
    outline-offset: 2px;
  }
  
  /* High contrast mode */
  @media (prefers-contrast: high) {
    body {
      background: white;
      color: black;
    }
  
    * {
      border-width: 2px !important;
    }
  }
  
  /* Reduce motion */
  @media (prefers-reduced-motion: reduce) {
    * {
      transition: none !important;
      animation: none !important;
    }
  }
  
  /* Print styles */
  @media print {
    #navcontainer,
    #searchbox,
    #sidebar_left,
    #footer {
      display: none !important;
    }
  
    body {
      background: white;
      color: black;
    }
  }


.mobile-menu {
    display: none;
}

  @media screen and (max-width: 1218px) {
    #searchbox form {
      margin-right: 0;
    }
  }

  @media screen and (max-width: 1218px) {
    #navcontainer #navlist, #navcontainer .nav-list {
      display: none !important;
    }
    .mobile-menu {
    display: block !important;
  }
  div#inner-navcontainer{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #navlist, #searchbox {
    flex: 2;
    margin-left: 20px;
    margin-right: 20px;
  }
  .mobile-nav {
    position: fixed;
    top: 110px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-width: 350px;
    z-index: 1000;
}
  }

  /* =================================================================
   MOBILE HAMBURGER MENU - Details/Summary
   ================================================================= */

/* Hide mobile menu by default on desktop */
.mobile-menu {
  display: none;
}

/* Reset default disclosure triangle */
.mobile-menu summary {
  list-style: none;
  cursor: pointer;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

/* Hamburger icon */
.hamburger {
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate hamburger to X when open */
.mobile-menu[open] .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu[open] .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu[open] .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  border-bottom: 1px solid var(--border);
}

.mobile-nav ul li:last-child {
  border-bottom: none;
}

.mobile-nav ul li a {
  display: block !important;
  padding: 16px 20px !important;
  color: var(--text-dark) !important;
  text-decoration: none !important;
  font-size: 16px !important;
}

.mobile-nav ul li a:hover {
  background: #f5f5f5;
  color: var(--primary) !important;
}

/* Mobile search in menu */
.mobile-search {
  padding: 16px 20px;
  border-top: 2px solid var(--border);
}

.mobile-search form {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.mobile-search input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.mobile-search input[type="submit"] {
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* Mobile breakpoint */
@media (max-width: 767px) {
  /* Show mobile menu */
  .mobile-menu {
    display: block;
  }
  
  /* Hide desktop navigation */
  #navlist,
  #searchbox {
    display: none !important;
  }
  
  /* Adjust nav container */
  div#inner-navcontainer {
    padding: 12px 20px !important;
  }
  
  .nav-logo-container a {
    font-size: 24px !important;
  }
  
  /* Full-width dropdown on mobile */
  .mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    max-width: 100%;
    border-radius: 0;
  }
}

/* Browse Catalog Layout */

#browse_cat_section a {
  white-space: nowrap;
}
#browse_cat_section {
  font-size: 0;
  display: flex;
  flex-direction: column;
}

#browse_cat_section a,
#browse_cat_section h2 {
  font-size: 18px;
  }

#browse_cat_section h2 {
font-size: 32px;
}

div#composer_letter_choice {
    font-size: 18px;
}
div#composer_letter_choice a {
    background: var(--primary);
    padding: 5px;
    border-radius: 6px;
    color: white;
    line-height: 2.5;
    text-decoration: none;
    /* width: 43px !important; */
    /* display: flex; */
    /* flex-direction: row; */
    min-width: 57px;
    text-align: center;
}

div#composer_letter_choice a:hover {
    opacity: 0.8;
    color: white;
}

div#composer_letter_choice {
  	font-size:0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

div#composer_list {
    column-count: 3;
    column-gap: 5em;
    padding: 2em;
    background: #fafafa;
    margin-top: 1em;
    border-radius: 10px
}

div#composer_letter_choice a {
  font-size: 16px;
}

/* =================================================================
   YAHOO GROUPS SUBSCRIBE FORM (legacy DB-embedded content, e.g. status_inquiry.php)
   The form is markup-defined in admin content with bgcolor="#FFFFCC" on a
   <table>; we override the inline HTML4 attributes with !important. The
   yimg.com "Join Now!" image is replaced via CSS by hiding it and turning
   the <input type="image"> into a labelled pill button.
   ================================================================= */
form[action*="groups.yahoo.com"] {
  display: block;
  max-width: 520px;
  margin: 24px auto;
}

form[action*="groups.yahoo.com"] table {
  width: 100%;
  background: #fff !important;
  border: 1px solid #cecdcc;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-collapse: separate;
  overflow: hidden;
}

form[action*="groups.yahoo.com"] td {
  padding: 16px 20px;
  border-bottom: none;
  background: transparent;
  vertical-align: middle;
}

form[action*="groups.yahoo.com"] tr:first-child td {
  background: var(--primary);
  text-align: center;
}

form[action*="groups.yahoo.com"] tr:first-child b {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

form[action*="groups.yahoo.com"] input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 15px;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #cecdcc;
  border-radius: 8px;
  box-sizing: border-box;
}

form[action*="groups.yahoo.com"] input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 95, 47, 0.15);
}

/* Replace the broken yimg.com "Join Now!" graphic with a themed button. */
form[action*="groups.yahoo.com"] input[type="image"] {
  width: auto !important;
  height: auto !important;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.15s ease;
  /* Hide the broken external image */
  font-size: 0;
  position: relative;
  min-width: 110px;
  min-height: 44px;
}

form[action*="groups.yahoo.com"] input[type="image"]::after {
  content: "Join Now";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

form[action*="groups.yahoo.com"] input[type="image"]:hover,
form[action*="groups.yahoo.com"] input[type="image"]:focus-visible {
  filter: brightness(0.85);
}

form[action*="groups.yahoo.com"] tr:last-child td {
  background: #fafaf9;
  text-align: center;
  font-size: 13px;
  color: #777;
  border-top: 1px solid #ececec;
}

form[action*="groups.yahoo.com"] tr:last-child a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

form[action*="groups.yahoo.com"] tr:last-child a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  form[action*="groups.yahoo.com"] td {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }
  form[action*="groups.yahoo.com"] input[type="image"] {
    width: 100% !important;
  }
}

/* =================================================================
   CONTACT BOX SECTION
   ================================================================= */
.contact-box-wrapper {
    width: 100%;
    padding: 32px 40px;
    /* background: #F5F5F5; */
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 2px solid #000;
}

.contact-box {
    max-width: 800px;
    width: 100%;
    background: linear-gradient(135deg, #E8E8E8 0%, #D3D3D3 100%);
    border: 2px solid #C0C0C0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-heading {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.contact-text {
    font-size: 15px;
    color: #555;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.contact-button {
    font-family: var(--font-display);
    display: inline-block;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.contact-button:hover {
    filter: brightness(0.85);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Kalmus-specific contact box styling */
body.site-kalmus .contact-box {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    border-color: var(--metallic-grey);
}


/* =================================================================
   TE-175  STICKY CONDENSED-HEADER SEARCH
   Everything is scoped under body.sticky-search-ui so that with the
   feature flag off ($_STICKY_SEARCH_UI = false) the layout is byte-for-byte
   today's. Remove the flag / class to fully revert.
   ================================================================= */

/* Sticky needs a non-clipping vertical overflow on ancestors. The container
   sets overflow:clip (to kill horizontal scroll); keep that on X only. */
body.sticky-search-ui #container,
body.sticky-search-ui .site-container {
  overflow: visible;
  overflow-x: clip;
}

/* --- sticky header --- */
body.sticky-search-ui .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: top 0.25s ease;
}

/* --- email strip. It must be GONE at the top (not a blank band) and only
   appear, anchored, once condensed. To do that WITHOUT reflow (reflow is what
   caused the bounce), the strip is a FIXED overlay: out of document flow, so
   showing/hiding it resizes nothing. It slides in from above the top edge, and
   the sticky header slides down by the strip's height to sit under it. Both are
   position-only changes -> no reflow -> no bounce. --- */
body.sticky-search-ui .site-utility-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  height: 34px;
  background: var(--primary);
  background: color-mix(in srgb, var(--primary) 82%, #000);
  transform: translateY(-100%);   /* parked above the viewport top */
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s ease;
}
body.sticky-search-ui .site-utility-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
body.sticky-search-ui .site-utility-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
body.sticky-search-ui .site-utility-email:hover,
body.sticky-search-ui .site-utility-email:focus-visible {
  text-decoration: underline;
}
body.sticky-search-ui .site-utility-email .site-header-pill-icon--email {
  width: 16px;
  height: 16px;
  background-color: #fff;
}
/* condensed: slide the strip in, and push the header down under it */
body.sticky-search-ui.header-search-active .site-utility-bar {
  transform: translateY(0);
  visibility: visible;
}
body.sticky-search-ui.header-search-active .site-header {
  top: 34px;
}

/* --- header centre: big email button (top) cross-fades to compact search ---
   Both live in the same grid cell. The email button sits in normal flow and
   fixes the cell height; the compact search overlays it (absolute), so swapping
   between them is opacity-only and never changes the header height. */
body.sticky-search-ui .site-header-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  /* TE-186 made the centre grid track `auto`. On pages where the in-flow email
     button is display:none (:not(.has-hero-search)) that track collapsed to ~0,
     so the absolute compact search (width:100%) had nothing to fill.

     A FIXED width can't work either: this 3-col layout holds until 767px, and a
     fixed 680 centre overflows (clipping the logo/pills, shoving the email button
     off-centre) at every width below ~1264. So the centre is RESPONSIVE: capped
     at 680 (the TE-184 target) but always yielding enough room for the side
     columns. 580 = side padding (80) + gaps (64) + logo col (~218) + pills col
     (~218); it keeps each 1fr side >=~218px (logo is max-width 200) down to 768,
     below which the header restacks (@media max-width:767). vw not % because a %
     resolves against the auto grid track and collapses circularly; stray vw
     scrollbar overflow is absorbed by overflow-x:clip on the container. */
  width: min(680px, calc(100vw - 580px));
}
body.sticky-search-ui .site-header-center .site-header-email {
  transition: opacity 0.25s ease;
}
body.sticky-search-ui .site-header-center .site-search-form--compact {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
/* Keep the in-flow email button bounded to the (now responsive) centre cell at
   every width, so it truncates with an ellipsis instead of overflowing onto the
   logo/pills when the cell is narrower than the full address. Full text shows on
   wide desktop where the cell reaches ~680; narrower cells ellipsize gracefully. */
body.sticky-search-ui .site-header-center .site-header-email {
  max-width: 100%;
  overflow: hidden;
}
body.sticky-search-ui .site-header-center .site-header-email > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- compact search in the header (centered) ---
   The header band is var(--primary); a bare navy submit button would blend into
   it. So the compact form is a WHITE "cushion" (a padded white pill): the input
   is borderless inside it and the navy button floats with a white frame on every
   side, keeping the button clearly separated from the navy header. */
/* compact = white "cushion" so the navy submit button never blends into the
   header band. Hidden by default (opacity/visibility only); shown when condensed. */
body.sticky-search-ui .site-search-form--compact {
  width: 100%;
  max-width: 680px;   /* TE-184: wider condensed search (fills ~half the side gaps) */
  background: #fff;
  padding: 5px;
  gap: 4px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
body.sticky-search-ui .site-search-form--compact:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 2px 10px rgba(0, 0, 0, 0.22);
}
body.sticky-search-ui .site-search-form--compact .site-search-input {
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
}
body.sticky-search-ui .site-search-form--compact .site-search-input:focus {
  box-shadow: none;
}
body.sticky-search-ui .site-search-form--compact .site-search-button {
  border-radius: 8px;
  padding: 0 18px;
  font-size: 14px;
}
body.sticky-search-ui .site-search-form--compact .site-search-typewriter {
  left: 14px;
  right: 14px;
  font-size: 14px;
}

/* condensed: hide the email button, reveal the compact search. Opacity/visibility
   only -> no box-size change -> no reflow -> no scroll bounce. */
body.sticky-search-ui.header-search-active .site-header-center .site-header-email {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.sticky-search-ui.header-search-active .site-search-form--compact {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Inner / hide-search pages (no hero): no email button; the compact search is
   the header search from the start. The email strip is always shown here, as a
   sticky in-flow band pinned above the header (which pins just below it). */
body.sticky-search-ui:not(.has-hero-search) .site-header-center .site-header-email { display: none; }
body.sticky-search-ui:not(.has-hero-search) .site-search-form--compact {
  position: static;
  transform: none;
  margin: 0 auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.sticky-search-ui:not(.has-hero-search) .site-utility-bar {
  position: sticky;
  transform: none;
  visibility: visible;
}
body.sticky-search-ui:not(.has-hero-search) .site-header {
  top: 34px;
}

body.sticky-search-ui #site-search-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

/* --- responsive --- */
@media (max-width: 1279px) {
  body.sticky-search-ui .site-utility-bar-inner { padding: 7px 24px; }
}

/* Tablet + mobile: header restacks; the centre drops to its own full-width row.
   Per client the compact search is always visible on mobile, the big email
   button is hidden, and the email strip is shown. */
@media (max-width: 767px) {
  /* Header restacks to two rows; the centre (email button at top, compact search
     when condensed) drops to its own full-width row. Everything else inherits
     the desktop condense behaviour so there is never a hero + compact double-up
     at page load. */
  body.sticky-search-ui .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  body.sticky-search-ui .site-header-brand   { grid-column: 1; grid-row: 1; }
  body.sticky-search-ui .site-header-actions { grid-column: 2; grid-row: 1; }
  body.sticky-search-ui .site-header-center  { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  /* email button must fit narrow screens: shrink and truncate the address */
  body.sticky-search-ui .site-header-center .site-header-email {
    max-width: 100%;
    font-size: 13px;
    overflow: hidden;
  }
  body.sticky-search-ui .site-header-center .site-header-email > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.sticky-search-ui .site-header-center .site-search-form--compact { max-width: none; }
  /* email strip padding tightened on small screens */
  body.sticky-search-ui .site-utility-bar-inner { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  body.sticky-search-ui .site-utility-bar,
  body.sticky-search-ui .site-header,
  body.sticky-search-ui .site-header-center .site-header-email,
  body.sticky-search-ui .site-search-form--compact {
    transition: none;
  }
}



