/* ============================================================
   TinyMate Shortcodes — tinymate-style.css
   All CSS variables, card styles, and grid layouts used by
   [tinymate_products] and [tinymate_categories] shortcodes.
   ============================================================ */

/* ── Design tokens ── */
:root {
  --tm-cream: #FFF8F0;
  --tm-blush: #FFE4E1;
  --tm-rose: #F4A7B9;
  --tm-dusty-rose: #D4849A;
  --tm-sage: #B5C9B0;
  --tm-sage-dark: #7A9E75;
  --tm-lavender: #D8D4F0;
  --tm-lavender-mid: #9990CC;
  --tm-warm-brown: #8B5E52;
  --tm-text-main: #4A3728;
  --tm-text-mid: #7A5C50;
  --tm-text-soft: #A07E74;
  --tm-white: #FFFFFF;
}

/* ── Container — centers content with a max-width ── */
.tinymate-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* ── Section wrapper ── */
.tinymate-section {
  padding: 60px 0;
  font-family: 'Nunito', sans-serif;
  color: var(--tm-text-main);
}

.tinymate-section-alt {
  background: #FAFAF5;
}

/* ── Featured / Fav Picks section ─────────────────────────────── */
.tinymate-section-featured {
  background: linear-gradient(145deg, #FFE4E1 0%, #FFF8F0 48%, #EDE8FA 100%);
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Decorative glowing blobs */
.tinymate-featured-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.tinymate-featured-deco-1 {
  width: 420px;
  height: 420px;
  right: -100px;
  top: -120px;
  background: radial-gradient(circle at 40% 40%,
      rgba(212, 132, 154, 0.22) 0%,
      rgba(212, 132, 154, 0.06) 55%,
      transparent 70%);
}

.tinymate-featured-deco-2 {
  width: 320px;
  height: 320px;
  left: -60px;
  bottom: -80px;
  background: radial-gradient(circle at 60% 60%,
      rgba(153, 144, 204, 0.18) 0%,
      rgba(153, 144, 204, 0.05) 55%,
      transparent 70%);
}

/* Featured section header overrides */
.tinymate-section-featured .tinymate-section-header {
  margin-bottom: 30px;
  /* Reduced to make room for filters */
}

.tinymate-section-featured .tinymate-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tm-dusty-rose);
  padding: 5px 16px;
  border-radius: 50px;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.tinymate-section-featured .tinymate-section-tag i {
  font-size: 10px;
  color: #E8A030;
}

.tinymate-section-featured .tinymate-section-title {
  font-size: 44px;
  line-height: 1.15;
}

.tinymate-featured-sub {
  font-size: 14px;
  color: var(--tm-text-mid);
  margin: 10px 0 0;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Quick Filters */
.tinymate-fav-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tm-filter-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(212, 132, 154, 0.2);
  color: var(--tm-text-mid);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.tm-filter-btn:hover {
  background: #fff;
  border-color: var(--tm-rose);
  color: var(--tm-dusty-rose);
}

.tm-filter-btn.active {
  background: var(--tm-dusty-rose);
  border-color: var(--tm-dusty-rose);
  color: #fff;
  box-shadow: 0 4px 12px rgba(212, 132, 154, 0.3);
}

/* Featured product cards — taller image + sharper shadow */
.tinymate-product-grid-featured .tinymate-product-card {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
  border-color: rgba(212, 132, 154, 0.25);
}

.tinymate-product-grid-featured .tinymate-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(212, 132, 154, 0.24);
}

.tinymate-product-grid-featured .tinymate-product-img {
  height: 220px;
}

/* ─────────────────────────────────────────────────────────── */

.tinymate-section-header {
  text-align: center;
  margin-bottom: 36px;
}

.tinymate-section-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--tm-sage-dark);
  margin-bottom: 10px;
  display: block;
}

.tinymate-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--tm-text-main);
  margin: 0;
  line-height: 1.2;
}

.tinymate-section-title em {
  font-style: italic;
  color: var(--tm-dusty-rose);
}

/* ── Product grid ── */
.tinymate-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .tinymate-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .tinymate-product-grid {
    grid-template-columns: 1fr;
  }
}

/* Card wrapper */
.tinymate-product-card-wrapper {
  display: flex;
  height: 100%;
}

/* Remove link underlines / colour from internal links */
.tinymate-product-img-link,
.tinymate-product-name-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.tinymate-product-card {
  background: var(--tm-white);
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid var(--tm-blush);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.tinymate-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(212, 132, 154, 0.18);
  border-color: var(--tm-rose);
}

/* Product image area */
.tinymate-product-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.tinymate-product-img.bg-blush {
  background: var(--tm-blush);
}

.tinymate-product-img.bg-lav {
  background: var(--tm-lavender);
}

.tinymate-product-img.bg-sage {
  background: #E8F0E7;
}

.tinymate-product-img.bg-rose {
  background: #FFE8E0;
}

.tinymate-product-img.bg-cream {
  background: #FFF3E0;
}

.tinymate-product-img.bg-mint {
  background: #E0F0EB;
}

.tinymate-product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tinymate-product-placeholder {
  font-size: 56px;
  line-height: 1;
}

/* Sale badge — diagonal corner ribbon */
.tinymate-sale-badge {
  position: absolute;
  top: 25px;
  left: -60px;
  width: 200px;
  background: #FF6B6B;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  padding: 6px 0;
  text-align: center;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Nunito', sans-serif;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.45);
  z-index: 2;
  pointer-events: none;
}

/* Product info */
.tinymate-product-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tinymate-product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--tm-text-main);
  line-height: 1.4;
  margin-bottom: 8px;
  font-family: 'Nunito', sans-serif;
}

.tinymate-product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 12px;
  flex-wrap: wrap;
}

.tinymate-product-price-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Override WooCommerce price styles to match TinyMate palette */
.tinymate-product-price-wrap .woocommerce-Price-amount,
.tinymate-product-price-wrap ins .woocommerce-Price-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--tm-dusty-rose) !important;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
}

.tinymate-product-price-wrap del {
  color: var(--tm-text-soft) !important;
  text-decoration: line-through !important;
  text-decoration-color: var(--tm-text-soft) !important;
  text-decoration-thickness: 1px !important;
  opacity: 0.8;
}

.tinymate-product-price-wrap del .woocommerce-Price-amount {
  font-size: 12px;
  color: inherit !important;
  font-weight: 600;
  text-decoration: none !important;
}

.tinymate-product-price-wrap ins {
  text-decoration: none !important;
}

/* "+" view product button */
.tinymate-add-btn {
  background: var(--tm-dusty-rose);
  color: var(--tm-white);
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 16px;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
  flex-shrink: 0;
  user-select: none;
  border: none;
}

.tinymate-product-card:hover .tinymate-add-btn {
  background: var(--tm-warm-brown);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 132, 154, 0.35);
}

.tinymate-add-btn:hover,
.tinymate-add-btn:focus,
.tinymate-add-btn:active {
  background: var(--tm-warm-brown) !important;
  color: #ffffff !important;
}

/* ── Category rows ─────────────────────────────────────────── */
/* New layout: one row per category, showing 3 latest products  */

.tinymate-cat-rows-section {
  background: #fff;
}

.tinymate-cat-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Each category row card */
.tinymate-cat-row {
  background: #fff;
  border-radius: 20px;
  border: 1.5px solid #FFE4E1;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.tinymate-cat-row:hover {
  box-shadow: 0 6px 24px rgba(212, 132, 154, 0.14);
}

/* Color-coded left border accent */
.tinymate-cat-row.c1 {
  border-left: 4px solid #F4A7B9;
}

.tinymate-cat-row.c2 {
  border-left: 4px solid #9990CC;
}

.tinymate-cat-row.c3 {
  border-left: 4px solid #7A9E75;
}

.tinymate-cat-row.c4 {
  border-left: 4px solid #C9A43A;
}

.tinymate-cat-row.c5 {
  border-left: 4px solid #C0604A;
}

.tinymate-cat-row.c6 {
  border-left: 4px solid #4A9E85;
}

/* Row header: icon-group on left, "View all" pinned right */
.tinymate-cat-row-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1.5px solid #FFE4E1;
  background: #FDFAF8;
  flex-wrap: nowrap !important;
}

/* Left group: icon + meta */
.tinymate-cat-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

/* FA icon bubble */
.tinymate-cat-row-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

/* Background + colour per accent class */
.tinymate-cat-row.c1 .tinymate-cat-row-icon-wrap {
  background: #FFE4E1;
  color: #D4849A;
}

.tinymate-cat-row.c2 .tinymate-cat-row-icon-wrap {
  background: #E8E6F8;
  color: #9990CC;
}

.tinymate-cat-row.c3 .tinymate-cat-row-icon-wrap {
  background: #E8F0E7;
  color: #7A9E75;
}

.tinymate-cat-row.c4 .tinymate-cat-row-icon-wrap {
  background: #FFF3E0;
  color: #C9A43A;
}

.tinymate-cat-row.c5 .tinymate-cat-row-icon-wrap {
  background: #FFE8E0;
  color: #C0604A;
}

.tinymate-cat-row.c6 .tinymate-cat-row-icon-wrap {
  background: #E0F0EB;
  color: #4A9E85;
}

/* Category name + count */
.tinymate-cat-row-meta {
  flex: 1;
  min-width: 0;
}

.tinymate-cat-row-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--tm-text-main);
  margin: 0 0 2px;
  line-height: 1.2;
}

.tinymate-cat-row-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--tm-text-soft);
}

/* "View all" link pill */
.tinymate-cat-row-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--tm-dusty-rose);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  border: 1.5px solid var(--tm-rose);
  border-radius: 50px;
  padding: 8px 18px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.tinymate-cat-row-link:hover {
  background: var(--tm-dusty-rose);
  border-color: var(--tm-dusty-rose);
  color: var(--tm-white);
}

.tinymate-cat-row-link i {
  font-size: 11px;
  transition: transform 0.2s;
}

.tinymate-cat-row-link:hover i {
  transform: translateX(3px);
}

/* Product grid inside the row */
.tinymate-cat-row-products {
  padding: 18px;
  background: #FAFAF5;
}

/* Always force 3 columns inside a category row */
.tinymate-cat-row-products.tinymate-product-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* Slightly smaller product image inside the row context */
.tinymate-cat-row-products .tinymate-product-img {
  height: 150px;
}

/* ── Old category card grid (kept for reference, no longer rendered) ── */
.tinymate-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ── Font Awesome icon circle (used by old card grid) ── */
.tinymate-cat-fa-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: background 0.2s, transform 0.2s;
}

.tinymate-cat-fa-icon i {
  font-size: 26px;
  color: var(--tm-dusty-rose);
  transition: color 0.2s;
}

.tinymate-cat-card.c2 .tinymate-cat-fa-icon i {
  color: var(--tm-lavender-mid);
}

.tinymate-cat-card.c3 .tinymate-cat-fa-icon i {
  color: var(--tm-sage-dark);
}

.tinymate-cat-card.c4 .tinymate-cat-fa-icon i {
  color: #B08040;
}

.tinymate-cat-card.c5 .tinymate-cat-fa-icon i {
  color: #C0604A;
}

.tinymate-cat-card.c6 .tinymate-cat-fa-icon i {
  color: #4A9E85;
}

/* ── Utility ── */
.tinymate-error,
.tinymate-no-products {
  text-align: center;
  padding: 20px;
  color: var(--tm-text-soft);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .tinymate-section {
    padding: 36px 0;
  }

  .tinymate-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tinymate-section-title {
    font-size: 26px;
  }

  .tinymate-cat-row-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .tinymate-cat-row-name {
    font-size: 16px;
  }

  .tinymate-cat-row-products.tinymate-product-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .tinymate-cat-row-products.tinymate-product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}