/* GGM Media Shortlist — deliberately inherits the active theme's typography. */
:root {
  --ggm-ink: #191919;
  --ggm-line: #d8d8d8;
  --ggm-soft: #f5f5f5;
  --ggm-white: #fff;
  --ggm-success: #176b3a;
  --ggm-error: #a12622;
  --ggm-catalog-green: #88ced0;
  --ggm-catalog-green-hover: #72babc;
}

/* Catalog mode: no public fixed prices or checkout-oriented actions. */
body:not(.wp-admin) .price,
body:not(.wp-admin) .product-price,
body:not(.wp-admin) .woocommerce-Price-amount,
body:not(.wp-admin) .add_to_cart_button,
body:not(.wp-admin) .ajax_add_to_cart,
body:not(.wp-admin) .single_add_to_cart_button,
body:not(.wp-admin) form.cart,
body:not(.wp-admin) .buy-now,
body:not(.wp-admin) .buy_now_button,
body:not(.wp-admin) [class*="buy-now"],
body:not(.wp-admin) [class*="buy_now"] {
  display: none !important;
}

.ggm-product-actions {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: auto;
  text-align: center;
}

.ggm-product-actions--single {
  max-width: 31rem;
  margin: 1.5rem 0 0;
  text-align: left;
}

/* Compact, uniform catalog action using the theme's teal brand color. */
.ggm-product-actions .ggm-add-media,
.woocommerce ul.products li.product .ggm-product-actions .ggm-add-media {
  position: static;
  box-sizing: border-box;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  min-height: 46px;
  margin: 0;
  padding: 13px 14px;
  border: 0;
  border-radius: 5px;
  background: var(--ggm-catalog-green) !important;
  color: var(--ggm-ink) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
  opacity: 1;
  transform: none;
}
.ggm-product-actions .ggm-add-media:hover,
.ggm-product-actions .ggm-add-media:focus,
.ggm-product-actions .ggm-add-media.is-added {
  background: var(--ggm-catalog-green-hover) !important;
  color: var(--ggm-ink) !important;
}

/* Normalize the theme's masonry cards across shop, category, and search archives. */
.woocommerce ul.products li.product {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  height: 360px;
}
.woocommerce ul.products li.product > .woocommerce-LoopProduct-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.woocommerce ul.products li.product > .woocommerce-LoopProduct-link img {
  box-sizing: border-box;
  width: 100% !important;
  height: 190px !important;
  margin: 0 0 16px !important;
  object-fit: contain;
  object-position: center;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  min-height: 4.8em;
  max-height: 4.8em;
  margin: 0 !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.ggm-catalog-filters {
  clear: both;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 1.35rem 0 1.45rem;
  border-top: 1px solid var(--ggm-line);
  border-bottom: 1px solid var(--ggm-line);
  color: var(--ggm-ink);
}
.ggm-filter-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.15rem;
}
.ggm-filter-kicker {
  display: block;
  margin-bottom: .2rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.ggm-filter-top h2 { margin: 0; font-size: 1.65rem; line-height: 1.15; }
.ggm-region-filter { display: grid; gap: .3rem; min-width: 210px; margin: 0; }
.ggm-region-filter span { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ggm-region-filter select {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: .55rem 2.1rem .55rem .75rem;
  border: 1px solid #aeb7b7;
  border-radius: 5px;
  background-color: var(--ggm-white);
  color: var(--ggm-ink);
  font: inherit;
  font-size: .9rem;
}
.ggm-genre-filters { display: flex; flex-wrap: wrap; gap: .55rem; }
.ggm-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .45rem .82rem;
  border: 1px solid #cbd5d5;
  border-radius: 999px;
  background: var(--ggm-white);
  color: var(--ggm-ink) !important;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
}
.ggm-filter-chip:hover,
.ggm-filter-chip:focus,
.ggm-filter-chip.is-active { border-color: var(--ggm-catalog-green); background: var(--ggm-catalog-green); }

#masthead .ggm-header-list > a {
  display: inline-flex !important;
  align-items: center;
  gap: .48rem;
}
#masthead .ggm-header-list strong {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--ggm-catalog-green);
  color: var(--ggm-ink);
  font-size: .75rem;
  line-height: 1;
}
#masthead .ggm-header-list.has-items strong { background: var(--ggm-catalog-green-hover); }

.ggm-btn,
a.ggm-btn,
button.ggm-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  padding: .78rem 1.15rem;
  border: 1px solid var(--ggm-ink);
  border-radius: 2px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .08s ease;
}

.ggm-btn:active { transform: translateY(1px); }
.ggm-btn:focus-visible,
.ggm-consult-link:focus-visible,
.ggm-floating-list:focus-visible,
.ggm-remove-media:focus-visible,
.ggm-continue-link:focus-visible { outline: 3px solid #1666d8; outline-offset: 3px; }

.ggm-btn--primary,
a.ggm-btn--primary,
button.ggm-btn--primary {
  color: var(--ggm-white) !important;
  background: var(--ggm-ink) !important;
}
.ggm-btn--primary:hover,
.ggm-btn--primary.is-added { color: var(--ggm-ink) !important; background: var(--ggm-white) !important; }
.ggm-btn--secondary,
a.ggm-btn--secondary { color: var(--ggm-ink) !important; background: transparent !important; }
.ggm-btn--secondary:hover { color: var(--ggm-white) !important; background: var(--ggm-ink) !important; }
.ggm-btn:disabled { opacity: .58; cursor: wait; }

.ggm-consult-link {
  display: inline-block;
  justify-self: start;
  color: var(--ggm-ink);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ggm-catalog-guidance {
  clear: both;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  width: 100%;
  margin: 0 0 1.5rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--ggm-line);
  background: var(--ggm-soft);
  color: var(--ggm-ink);
}
.ggm-catalog-guidance a { color: inherit; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

.ggm-floating-list {
  position: fixed;
  z-index: 9997;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem .8rem .75rem 1rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: var(--ggm-ink);
  color: var(--ggm-white) !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
}
.ggm-floating-list strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--ggm-white);
  color: var(--ggm-ink);
}
.ggm-floating-list:not(.has-items) { opacity: .84; }

.ggm-media-list-page {
  box-sizing: border-box;
  width: min(100% - 36px, 980px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
  color: var(--ggm-ink);
}
.ggm-list-header { max-width: 720px; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.ggm-kicker { margin: 0 0 .8rem; font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.ggm-list-header h1 { margin: 0 0 .75rem; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1; letter-spacing: -.035em; }
.ggm-list-header > p:not(.ggm-kicker) { max-width: 62ch; margin: 0 0 1.25rem; font-size: 1.05rem; line-height: 1.65; }
.ggm-continue-link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.ggm-list-section,
.ggm-inquiry-section { padding: clamp(1.4rem, 4vw, 2.5rem) 0; border-top: 1px solid var(--ggm-line); }
.ggm-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ggm-section-heading h2,
.ggm-inquiry-section h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.3rem); line-height: 1.15; }
.ggm-list-count-label { color: #565656; white-space: nowrap; }
.ggm-list-items { display: grid; gap: 0; }
.ggm-list-item { display: grid; gap: .7rem; padding: 1.3rem 0; border-top: 1px solid var(--ggm-line); }
.ggm-list-item:first-child { border-top: 0; }
.ggm-list-item__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ggm-list-item__name { color: inherit; font-size: 1.08rem; font-weight: 800; text-decoration: none; }
.ggm-list-item__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.ggm-list-item label { margin: 0; color: #464646; font-size: .84rem; font-weight: 700; }
.ggm-list-item textarea { width: 100%; max-width: none; min-height: 72px; padding: .75rem; border: 1px solid #777; border-radius: 2px; background: var(--ggm-white); color: var(--ggm-ink); font: inherit; }
.ggm-remove-media { border: 0; padding: .25rem 0; background: transparent; color: #7e211d; font: inherit; font-size: .86rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ggm-empty-state { padding: 2rem; border: 1px solid var(--ggm-line); background: var(--ggm-soft); text-align: center; }
.ggm-empty-state .ggm-btn { width: auto; margin-top: .5rem; }
.ggm-empty-state[hidden] { display: none; }

.ggm-inquiry-section {
  max-width: 820px;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid #d8e2e2;
  border-radius: 5px;
  background: #f7fafa;
}
.ggm-inquiry-section > p { max-width: 62ch; margin: .6rem 0 1.35rem; color: #484848; line-height: 1.5; }
.ggm-inquiry-section.is-disabled form { opacity: .55; pointer-events: none; }
.ggm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.ggm-field { display: grid; align-content: start; gap: .42rem; }
.ggm-field--full { grid-column: 1 / -1; }
.ggm-field label { margin: 0; color: var(--ggm-ink); font-size: .9rem; font-weight: 800; }
.ggm-field label span { color: #5a5a5a; font-size: .78rem; font-weight: 500; }
.ggm-field input,
.ggm-field textarea { box-sizing: border-box; width: 100%; max-width: none; min-height: 44px; margin: 0; padding: .65rem .75rem; border: 1px solid #707070; border-radius: 5px; background: var(--ggm-white); color: var(--ggm-ink); font: inherit; }
.ggm-field textarea { resize: vertical; }
.ggm-field input:focus,
.ggm-field textarea:focus,
.ggm-list-item textarea:focus { outline: 3px solid rgba(22,102,216,.24); border-color: #1666d8; }
.ggm-check { display: flex; align-items: flex-start; gap: .7rem; margin: 1rem 0; color: var(--ggm-ink); font-weight: 700; cursor: pointer; }
.ggm-check input { flex: 0 0 auto; width: 19px; height: 19px; margin-top: .15rem; accent-color: var(--ggm-ink); }
.ggm-inquiry-section button.ggm-submit { width: auto; min-width: 210px; border-color: var(--ggm-catalog-green) !important; background: var(--ggm-catalog-green) !important; color: var(--ggm-ink) !important; }
.ggm-inquiry-section button.ggm-submit:hover { background: var(--ggm-catalog-green-hover) !important; }
.ggm-inquiry-section .ggm-check input { accent-color: var(--ggm-catalog-green-hover); }
.ggm-form-status { display: none; margin: 1rem 0; padding: .9rem 1rem; border-left: 4px solid; }
.ggm-form-status.is-success { display: block; border-color: var(--ggm-success); background: #edf8f1; color: #0f542c; }
.ggm-form-status.is-error { display: block; border-color: var(--ggm-error); background: #fff0ef; color: #7e1e1a; }
.ggm-form-note { max-width: 62ch; margin: .85rem 0 0; color: #555; font-size: .8rem; line-height: 1.5; }
.ggm-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (max-width: 767px) {
  .ggm-catalog-guidance { align-items: flex-start; flex-direction: column; }
  .ggm-form-grid { grid-template-columns: 1fr; }
  .ggm-field--full { grid-column: auto; }
  .ggm-section-heading { align-items: flex-start; flex-direction: column; }
  .ggm-list-item__top { align-items: flex-start; }
  .ggm-btn { white-space: normal; }
  .ggm-floating-list { right: 12px; bottom: 12px; }
  .ggm-floating-list span { max-width: 120px; }
  .ggm-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ggm-btn { transition: none; }
}
