/**
 * PrintaSource Affiliate Showcase - Frontend Styles
 * Ultra-compact, clean, responsive affiliate cards styled to match printasource.com (Kadence theme)
 */

:root {
  --pas-brand: var(--global-palette1, #049f82);
  --pas-brand-hover: var(--global-palette2, #008f72);
  --pas-font: var(--global-body-font-family, 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  --pas-font-heading: var(--global-heading-font-family, 'DM Serif Display', Georgia, serif);
  --pas-text: var(--global-palette3, #222222);
  --pas-text-muted: var(--global-palette6, #676767);
  --pas-border: var(--global-palette7, #e8eceb);
  --pas-bg-box: var(--global-palette8, #fbfbfb);
  --pas-bg-card: var(--global-palette9, #ffffff);
  --pas-radius: 8px;
  --pas-radius-sm: 6px;
}

/* Outer Showcase Box */
.pas-showcase-box {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  background: var(--pas-bg-box);
  border: 1px solid var(--pas-border);
  border-radius: 10px;
  font-family: var(--pas-font);
  box-sizing: border-box;
}

.pas-showcase-box *,
.pas-showcase-box *::before,
.pas-showcase-box *::after {
  box-sizing: border-box;
}

/* Box Header */
.pas-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--pas-border);
}

.pas-box-title {
  margin: 0;
  font-family: var(--pas-font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--pas-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.pas-box-disclosure {
  font-size: 0.74rem;
  color: var(--pas-text-muted);
  font-style: italic;
  margin: 0;
  line-height: 1.35;
}

/* Vertical List of Compact Cards */
.pas-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Compact Card */
.pas-card-vertical {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  background: var(--pas-bg-card);
  border: 1px solid var(--pas-border);
  border-radius: var(--pas-radius);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pas-card-vertical:hover {
  border-color: var(--pas-brand);
  box-shadow: 0 2px 8px rgba(4, 159, 130, 0.08);
  transform: translateY(-1px);
}

/* Compact Thumbnail */
.pas-vertical-thumb {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #edf1f0;
  border-radius: var(--pas-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}

.pas-vertical-thumb a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pas-vertical-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Content Area */
.pas-vertical-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.pas-card-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pas-brand);
  line-height: 1.2;
}

.pas-vertical-title {
  margin: 0;
  font-family: var(--pas-font);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pas-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pas-vertical-title a {
  color: var(--pas-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.pas-vertical-title a:hover {
  color: var(--pas-brand);
}

.pas-vertical-desc {
  margin: 3px 0 0 0;
  font-family: var(--pas-font);
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--pas-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Buy Now Button */
.pas-vertical-action {
  flex-shrink: 0;
  margin-left: auto;
}

.pas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.15rem;
  background: var(--pas-brand);
  color: #ffffff !important;
  font-family: var(--pas-font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--pas-radius-sm);
  text-decoration: none !important;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(4, 159, 130, 0.2);
}

.pas-btn:hover {
  background: var(--pas-brand-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(4, 159, 130, 0.3);
}

/* ==========================================================================
   GRID LAYOUT (OPTIONAL)
   ========================================================================== */
.pas-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.pas-card {
  display: flex;
  flex-direction: column;
  background: var(--pas-bg-card);
  border: 1px solid var(--pas-border);
  border-radius: var(--pas-radius);
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pas-card:hover {
  border-color: var(--pas-brand);
  box-shadow: 0 3px 8px rgba(4, 159, 130, 0.08);
  transform: translateY(-2px);
}

.pas-img-wrap {
  width: 100%;
  height: 120px;
  padding: 0.75rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--pas-border);
}

.pas-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pas-card-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.pas-card-title {
  margin: 0;
  font-family: var(--pas-font);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pas-text);
}

.pas-card-title a {
  color: inherit;
  text-decoration: none;
}

.pas-card-title a:hover {
  color: var(--pas-brand);
}

.pas-card-body .pas-btn {
  margin-top: auto;
  width: 100%;
}

/* ==========================================================================
   SPOTLIGHT HERO CARD
   ========================================================================== */
.pas-spotlight-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  background: var(--pas-bg-card);
  border: 1px solid var(--pas-border);
  border-left: 4px solid var(--pas-brand);
  border-radius: var(--pas-radius);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pas-spotlight-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(4, 159, 130, 0.08);
}

.pas-spotlight-img {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: #ffffff;
  border-radius: var(--pas-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid #edf1f0;
}

.pas-spotlight-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pas-spotlight-content {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pas-spotlight-title {
  margin: 0;
  font-family: var(--pas-font);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pas-text);
  line-height: 1.35;
}

.pas-spotlight-title a {
  color: inherit;
  text-decoration: none;
}

.pas-spotlight-title a:hover {
  color: var(--pas-brand);
}

.pas-spotlight-actions {
  flex-shrink: 0;
  margin-left: auto;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 580px) {
  .pas-showcase-box {
    padding: 0.95rem 0.85rem;
  }
  
  .pas-box-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .pas-card-vertical {
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
  }

  .pas-vertical-thumb {
    width: 48px;
    height: 48px;
  }

  .pas-vertical-title {
    font-size: 0.86rem;
  }

  .pas-btn {
    padding: 0.42rem 0.95rem;
    font-size: 0.78rem;
  }

  .pas-spotlight-card {
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
  }

  .pas-spotlight-img {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 440px) {
  .pas-card-vertical {
    flex-wrap: wrap;
  }

  .pas-vertical-action {
    width: 100%;
    margin-left: 0;
    margin-top: 0.3rem;
  }

  .pas-vertical-action .pas-btn {
    width: 100%;
  }

  .pas-spotlight-card {
    flex-wrap: wrap;
  }

  .pas-spotlight-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 0.3rem;
  }

  .pas-spotlight-actions .pas-btn {
    width: 100%;
  }
}
