/* ============================================================
   U-M CANVAS CATALOG MODERN STOREFRONT
   Beginner-Friendly Custom CSS Template
   ============================================================

   QUICK START

   You do NOT need to understand CSS to use this template.

   Most Catalog admins only need to:

   1. Add the unit logo URL.
   2. Choose a color theme if desired.
   3. Paste this entire template into Custom CSS.
   4. Preview the Catalog home page.
   5. Preview one course or program page.
   6. Check the Catalog on a phone.

   Look for:

      EDIT HERE

   Most admins should not change anything below:

      STOP EDITING HERE

   IMPORTANT:
   Keep the !important statements in this template.

   ============================================================ */


/* ============================================================
   U-M BRAND COLOR LIBRARY
   DO NOT EDIT
   ============================================================ */

:root {

  /* U-M SIGNATURE COLORS */

  --um-blue: #00274C;
  --um-maize: #FFCB05;


  /* BASIC COLORS */

  --um-white: #FFFFFF;
  --um-black: #000000;


  /* U-M SUPPORTING COLORS */

  --um-tappan-red: #9A3324;
  --um-ross-orange: #D86018;
  --um-rackham-green: #75988D;
  --um-wave-field-green: #A5A508;
  --um-taubman-teal: #00B2A9;
  --um-arboretum-blue: #2F65A7;
  --um-a2-amethyst: #702082;
  --um-matthaei-violet: #575294;
  --um-peony-pink: #E01F7C;
  --um-umma-tan: #CFC096;


  /* ==========================================================
     EDIT HERE: YOUR CATALOG SETTINGS
     ==========================================================

     Most Catalog admins should ONLY change this section.

     DEFAULT THEME:
     Michigan Blue + Michigan Maize
     ========================================================== */


  /* Main storefront color */

  --unit-primary: var(--um-blue);


  /* Accent color */

  --unit-accent: var(--um-maize);


  /* Secondary accent */

  --unit-secondary: var(--um-maize);


  /* Text displayed on Maize/light buttons */

  --unit-button-text: var(--um-blue);


  /* PROGRAM and COURSE labels */

  --unit-label-color: var(--um-blue);


  /* Main page background

     WHITE prevents the broad gray shading that appeared
     in the earlier version.
  */

  --unit-page-bg: var(--um-white);


  /* Search and Filters button background */

  --unit-search-button-bg: var(--um-white);


  /* ==========================================================
     UNIT LOGO

     Paste your logo image URL between the quotation marks.

     Example:

     --unit-logo-url: url("https://example.com/logo.png");

     Keep:
       url(
       quotation marks
       closing );
     ========================================================== */

  --unit-logo-url: url("PASTE-YOUR-LOGO-URL-HERE");

}


/* ============================================================
   STOP EDITING HERE

   Most Catalog admins should not need to change anything
   below this line.
   ============================================================ */


/* ============================================================
   1. TOP HEADER
   ============================================================ */


/* Keep top header white */

[data-customizationid="header"] > div:first-child {
  background-color: var(--um-white) !important;
}


/* Login, cart and other header links */

[data-customizationid="header"] a,
[data-customizationid="login-link"] {
  color: var(--um-black) !important;
}


/* Hide standard Canvas Catalog header image */

[data-customizationid="linked-headerimage"] {
  visibility: hidden !important;
}


/* ============================================================
   2. HOME PAGE
   LOGO AND WELCOME AREA
   ============================================================ */

[data-customizationid="cover-image-section"] {

  background-color:
    var(--um-white) !important;

  color:
    var(--um-black) !important;

  display:
    flex !important;

  align-items:
    center !important;

  gap:
    48px !important;

  max-width:
    1188px !important;

  height:
    auto !important;

  max-height:
    none !important;

  margin:
    0 auto !important;

  padding:
    16px 24px !important;

  box-sizing:
    border-box !important;

  line-height:
    1.6 !important;
}


/* Allow welcome area to expand with content */

[data-customizationid="header"]
div:has(> [data-customizationid="cover-image-section"]) {

  height:
    auto !important;
}


/* Default home-page logo size */

[data-customizationid="cover-image-section"] > img {

  flex:
    0 0 auto !important;

  width:
    auto !important;

  height:
    150px !important;
}


/* Position welcome text beside the logo */

[data-customizationid="cover-image-section"] > div {

  position:
    static !important;

  inset:
    auto !important;

  flex:
    1 1 auto !important;
}


/* Remove extra spacing from nested welcome content */

[data-customizationid="cover-image-section"] > div * {

  max-width:
    none !important;

  margin-left:
    0 !important;

  padding-left:
    0 !important;

  padding-right:
    0 !important;
}


/* Left-align welcome text */

[data-customizationid="cover-image-section"]
div[style*="text-align"] {

  text-align:
    left !important;
}


/* Welcome-area text */

[data-customizationid="cover-image-section"] > div span,
[data-customizationid="cover-image-section"] > div a {

  font-size:
    17px !important;
}


/* Welcome-area links */

[data-customizationid="cover-image-section"] a {

  color:
    var(--unit-primary) !important;

  font-weight:
    700 !important;
}


/* Collapse repeated blank lines */

[data-customizationid="cover-image-section"] br + br {

  display:
    none !important;
}


/* ============================================================
   3. HOME PAGE LOGO
   DESKTOP
   ============================================================ */

@media (min-width: 768px) {

  [data-customizationid="header"]
  div:has(> [data-customizationid="cover-image-section"]) {

    overflow:
      visible !important;

    margin-top:
      -50px !important;

    position:
      relative !important;

    z-index:
      1 !important;

    pointer-events:
      none !important;

    background:
      transparent !important;
  }


  [data-customizationid="cover-image-section"] {

    background:
      transparent !important;

    padding-top:
      0 !important;

    padding-bottom:
      20px !important;
  }


  [data-customizationid="cover-image-section"] a {

    pointer-events:
      auto !important;
  }


  /* ========================================================
     ADVANCED: HOME-PAGE LOGO TUNING
     ======================================================== */

  [data-customizationid="cover-image-section"] > img {

    width:
      520px !important;

    height:
      132px !important;

    object-fit:
      cover !important;

    object-position:
      50% 46% !important;
  }

}


/* ============================================================
   4. HOME PAGE
   PHONE LAYOUT
   ============================================================ */

@media (max-width: 767px) {

  [data-customizationid="cover-image-section"] {

    flex-direction:
      column !important;

    gap:
      12px !important;

    text-align:
      center !important;
  }


  [data-customizationid="cover-image-section"] > img {

    width:
      auto !important;

    height:
      110px !important;

    max-width:
      100% !important;
  }


  [data-customizationid="cover-image-section"]
  div[style*="text-align"] {

    text-align:
      center !important;
  }

}


/* ============================================================
   5. MAIZE HEADER STRIPE
   ============================================================

   Separates the white header from the Catalog content.
   ============================================================ */

[data-customizationid="header"] > div:last-child {

  background-color:
    var(--um-white) !important;

  border-top:
    12px solid var(--unit-secondary) !important;

  border-bottom:
    none !important;
}


/* Keep nested lower-header container white */

[data-customizationid="header"] > div:last-child > div {

  background-color:
    var(--um-white) !important;
}


/* ============================================================
   6. REMOVE UNUSED HEADER SPACE
   ON COURSE AND PROGRAM PAGES
   ============================================================

   Removes the unwanted gray horizontal strip that can appear
   between the Maize stripe and Michigan Blue product hero.

   Desired result:

   WHITE HEADER
        ↓
   MAIZE STRIPE
        ↓
   MICHIGAN BLUE HERO
   ============================================================ */

body:has(#product-page)
[data-customizationid="header"] > div:last-child {

  background-color:
    var(--um-white) !important;

  border-top:
    12px solid var(--unit-secondary) !important;

  border-bottom:
    none !important;

  min-height:
    0 !important;

  height:
    12px !important;

  margin:
    0 !important;

  padding:
    0 !important;

  overflow:
    hidden !important;
}


/* Hide unused nested header content on product pages */

body:has(#product-page)
[data-customizationid="header"] > div:last-child > div {

  display:
    none !important;
}


/* ============================================================
   7. HOME PAGE LISTINGS AREA
   ============================================================

   Michigan Blue appears behind the title/search area.

   Everything beneath that area is WHITE.
   ============================================================ */

body:has(#home-page) #content {

  background:
    linear-gradient(
      180deg,
      var(--unit-primary) 0px,
      var(--unit-primary) 200px,
      var(--unit-page-bg) 200px
    ) !important;
}


#content > div,
#home-page {

  background:
    transparent !important;
}


/* ============================================================
   8. PAGE TITLES
   ============================================================ */

#content h1 {

  color:
    var(--um-white) !important;

  font-size:
    2.6rem !important;
}


/* Short Maize accent under main title */

#content h1::after {

  content:
    "";

  display:
    block;

  width:
    80px;

  height:
    5px;

  margin-top:
    10px;

  background:
    var(--unit-accent);

  border-radius:
    3px;
}


#content h2 {

  color:
    var(--um-white) !important;
}


/* ============================================================
   9. HOME PAGE LISTINGS
   PHONE LAYOUT
   ============================================================ */

@media (max-width: 767px) {

  body:has(#home-page) #content {

    background:
      linear-gradient(
        180deg,
        var(--unit-primary) 0px,
        var(--unit-primary) 265px,
        var(--unit-page-bg) 265px
      ) !important;
  }


  #content h2 {

    color:
      var(--unit-primary) !important;
  }

}


/* ============================================================
   10. SEARCH AND FILTERS
   ============================================================ */

[data-customizationid="search-form"] {

  background-color:
    transparent !important;
}


/* Search field */

[data-customizationid="search-form"] input {

  border:
    2px solid var(--um-white) !important;
}


/* Search and Filters buttons */

[data-customizationid="search-form"] button,
[data-customizationid="search-form"] button span,
[data-customizationid="filter-button"],
[data-customizationid="filter-button"] span {

  background-color:
    var(--unit-search-button-bg) !important;

  color:
    var(--unit-button-text) !important;

  border-color:
    var(--unit-search-button-bg) !important;
}


/* ============================================================
   11. LISTING CARDS
   ============================================================ */

[data-customizationid="product-card"] {

  background-color:
    var(--um-white) !important;

  border:
    none !important;

  border-top:
    6px solid var(--unit-accent) !important;

  border-radius:
    14px !important;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.12) !important;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease !important;
}


/* Small lift on hover */

[data-customizationid="product-card"]:hover {

  transform:
    translateY(-6px) !important;

  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.18) !important;
}


/* Listing image */

[data-customizationid="product-card-image"] {

  border-radius:
    10px !important;

  overflow:
    hidden !important;
}


/* PROGRAM and COURSE labels */

[data-customizationid="product-card-type"] {

  color:
    var(--unit-label-color) !important;

  font-size:
    0.75rem !important;

  font-weight:
    700 !important;

  letter-spacing:
    0.08em !important;

  text-transform:
    uppercase !important;
}


/* Course/program title */

[data-customizationid="product-card-title"] {

  color:
    var(--unit-primary) !important;
}


/* ============================================================
   12. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  [data-customizationid="product-card"],
  [data-customizationid="product-card"]:hover {

    transition:
      none !important;

    transform:
      none !important;
  }

}


/* ============================================================
   13. FOOTER
   ============================================================ */

[data-customizationid="footer"] {

  background-color:
    var(--um-white) !important;
}


/* Michigan Blue footer accent */

[data-customizationid="footer"] > div:first-child {

  border-bottom:
    6px solid var(--unit-primary) !important;
}


/* ============================================================
   14. OPTIONAL TWO-COLUMN LISTING DESCRIPTION
   ============================================================

   Only affects listing descriptions using:

   <div class="wrapper">
     <div class="column">...</div>
     <div class="column">...</div>
   </div>

   If your listing does not use those classes, this section
   has no effect.
   ============================================================ */

.wrapper {

  display:
    flex;

  flex-wrap:
    wrap;

  justify-content:
    space-between;

  gap:
    10%;
}


.wrapper .column {

  flex:
    1;

  min-width:
    400px;
}


/* Stack columns on phones */

@media (max-width: 767px) {

  .wrapper .column {

    min-width:
      100%;
  }

}


/* ============================================================
   15. HEADER LOGO ON NON-HOME PAGES
   ============================================================

   Course pages, program pages, cart and login do not display
   the same large home-page cover image.

   This displays the configured unit logo in the header.
   ============================================================ */

body:not(:has([data-customizationid="cover-image-section"]))
[data-customizationid="header"]
[data-customizationid="linked-headerimage"] {

  visibility:
    visible !important;

  display:
    block !important;

  width:
    280px !important;

  height:
    72px !important;

  min-height:
    72px !important;

  background-image:
    var(--unit-logo-url) !important;

  background-size:
    280px auto !important;

  /* ADVANCED: HEADER LOGO TUNING */

  background-position:
    0 -17px !important;

  background-repeat:
    no-repeat !important;
}


/* ============================================================
   16. COURSE/PROGRAM DETAIL-PAGE BACKGROUND
   ============================================================

   WHITE replaces the previous gray background.
   ============================================================ */

body:has(#product-page) #content {

  background:
    var(--unit-page-bg) !important;
}


/* ============================================================
   17. DETAIL-PAGE CONTENT SECTIONS
   ============================================================ */

#product-page section {

  background:
    var(--um-white) !important;

  border-top:
    6px solid var(--unit-accent) !important;

  border-radius:
    14px !important;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.08) !important;

  padding:
    24px 28px !important;

  margin-bottom:
    24px !important;
}


/* Detail-page headings */

#product-page h1,
#product-page h2 {

  color:
    var(--unit-primary) !important;
}


/* PROGRAM and COURSE label */

[data-customizationid="product-details-type"],
[data-customizationid="product-details-type"] * {

  color:
    var(--unit-label-color) !important;
}


/* Price */

[data-customizationid="product-details-price"],
[data-customizationid="product-details-price"] * {

  color:
    var(--unit-primary) !important;

  font-weight:
    700 !important;
}


/* Standard Enroll button */

[data-customizationid="enroll-button"] span {

  background-color:
    var(--unit-primary) !important;

  border-color:
    var(--unit-primary) !important;
}


/* Product image */

[data-customizationid="product-details-image"] img {

  border-radius:
    14px !important;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.15) !important;
}


/* ============================================================
   18. COURSE/PROGRAM HERO BAND
   ============================================================

   Creates the full-width Michigan Blue area containing:

   - Course/program title
   - Course/program image
   - Course/program type
   - Price
   - Listing information
   - Enroll controls
   ============================================================ */

#product-page
span:has(> section)
> span:first-child {

  background:
    var(--unit-primary) !important;

  box-shadow:
    0 0 0 100vmax var(--unit-primary) !important;

  clip-path:
    inset(-36px -100vmax) !important;

  margin-bottom:
    72px !important;
}


/* White course/program title */

#product-page
span:has(> section)
> span:first-child h1 {

  color:
    var(--um-white) !important;
}


/* ============================================================
   19. HERO-BAND TEXT
   ============================================================ */

#product-page
span:has(> section)
> span:first-child
[data-customizationid="product-details-type"],

#product-page
span:has(> section)
> span:first-child
[data-customizationid="product-details-type"] *,

#product-page
span:has(> section)
> span:first-child
[data-customizationid="product-details-price"],

#product-page
span:has(> section)
> span:first-child
[data-customizationid="product-details-price"] *,

#product-page
span:has(> section)
> span:first-child
[data-customizationid="product-info-item-list"],

#product-page
span:has(> section)
> span:first-child
[data-customizationid="product-info-item-list"] * {

  color:
    var(--um-white) !important;
}


/* ============================================================
   20. MAIZE ENROLL BUTTON ON HERO
   ============================================================ */

#product-page
span:has(> section)
> span:first-child
[data-customizationid="enroll-button"] span {

  background-color:
    var(--unit-secondary) !important;

  border-color:
    var(--unit-secondary) !important;

  color:
    var(--unit-button-text) !important;
}


#product-page
span:has(> section)
> span:first-child
[data-customizationid="enroll-button"] * {

  color:
    var(--unit-button-text) !important;

  fill:
    var(--unit-button-text) !important;
}


/* ============================================================
   21. DETAIL PAGE
   PHONE LAYOUT
   ============================================================ */

@media (max-width: 767px) {

  #product-page h1 {

    font-size:
      1.9rem !important;
  }

}


/* ============================================================
   22. REMOVE GRAY AREA ABOVE FOOTER
   ============================================================

   Removes the unwanted gray/background area between the final
   course/program section and the footer.

   This specifically addresses the empty strip visible beneath
   the "Sign up for this course today!" card.
   ============================================================ */

body:has(#product-page) #content {

  background-color:
    var(--um-white) !important;

  padding-bottom:
    0 !important;

  margin-bottom:
    0 !important;
}


/* Remove unnecessary spacing from the product-page container */

body:has(#product-page) #product-page {

  padding-bottom:
    0 !important;

  margin-bottom:
    0 !important;
}


/* ============================================================
   23. FORCE PRODUCT-PAGE SURROUNDING BACKGROUND TO WHITE
   ============================================================

   This prevents Canvas Catalog's default pale gray background
   from appearing around the bottom of the product page.
   ============================================================ */

body:has(#product-page),
body:has(#product-page) #content,
body:has(#product-page) #product-page,
body:has(#product-page) main {

  background-color:
    var(--um-white) !important;
}


/* ============================================================
   24. PRODUCT-PAGE FOOTER
   ============================================================

   Ensures the footer starts on a white background instead of
   inheriting a gray area from the product-page container.
   ============================================================ */

body:has(#product-page)
[data-customizationid="footer"] {

  margin-top:
    0 !important;

  padding-top:
    0 !important;

  background-color:
    var(--um-white) !important;
}