/*
 Theme Name:   The Living Edit
 Theme URI:    https://thelivingedit.com
 Description:  Child theme for The Living Edit — curated home finds, retro details and design-led pieces.
 Author:       The Living Edit
 Author URI:   https://thelivingedit.com
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  thelivingedit-child
*/

/* ============================================================
   THE LIVING EDIT — DESIGN SYSTEM
   ============================================================
   Color Palette:
     Deep Aubergine   #3B1E2F  (header, footer)
     Topaze Orange    #FF6A29  (logo, accents, hover)
     Olive            #6B6F3A  (CTA buttons, badges)
     Warm Ivory       #F3E9D7  (body background)
     Soft Taupe       #C6B8A7  (borders, subtle accents)
     Dark Text        #2F2623  (body text)
     Darker Plum      #2B1827  (optional dark variant)
     Muted Olive      #5E6335  (optional olive variant)
     Pale Background  #F8F2E7  (optional lighter bg)

   Typography:
     Logo / Display:  Anybody (bold, rounded, retro-compact)
     Headings:        Playfair Display (elegant serif)
     Body / Menu:     Manrope (clean sans-serif)
   ============================================================ */


/* ----- CSS VARIABLES ----- */
:root {
  /* Colors */
  --tle-aubergine:     #3B1E2F;
  --tle-aubergine-dark: #2B1827;
  --tle-orange:        #FF6A29;
  --tle-olive:         #6B6F3A;
  --tle-olive-muted:   #5E6335;
  --tle-ivory:         #F3E9D7;
  --tle-ivory-pale:    #F8F2E7;
  --tle-taupe:         #C6B8A7;
  --tle-text:          #2F2623;

  /* Typography sizes */
  --tle-font-xs:    0.75rem;    /* 12px */
  --tle-font-sm:    0.8125rem;  /* 13px */
  --tle-font-base:  1rem;       /* 16px */
  --tle-font-md:    1.125rem;   /* 18px */
  --tle-font-lg:    1.5rem;     /* 24px */
  --tle-font-xl:    2rem;       /* 32px */
  --tle-font-2xl:   2.5rem;     /* 40px */
  --tle-font-3xl:   3.25rem;    /* 52px */

  /* Spacing */
  --tle-gap:        1.5rem;
  --tle-gap-sm:     1rem;
  --tle-gap-lg:     2.5rem;
  --tle-radius:     4px;

  /* Layout */
  --tle-max-width:  1200px;
  --tle-header-h:   72px;
}


/* ----- GLOBAL RESET & BASE ----- */
.tle-site *,
.tle-site *::before,
.tle-site *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.tle-site,
.tle-site {
  background-color: var(--tle-ivory);
  color: var(--tle-text);
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ----- TYPOGRAPHY ----- */

/* Logo font — bold, retro, compact, stacked */
.tle-logo {
  font-family: 'Anybody', sans-serif;
  font-weight: 800;
  font-style: normal;
  color: var(--tle-orange);
  text-decoration: none;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}
.tle-logo span {
  display: block;
}

/* Editorial serif headings */
.tle-site h1,
.tle-site h2,
.tle-site h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--tle-text);
  line-height: 1.15;
}

.tle-site h1 { font-size: var(--tle-font-3xl); }
.tle-site h2 { font-size: var(--tle-font-2xl); }
.tle-site h3 { font-size: var(--tle-font-lg);  }

/* Body text */
.tle-site p {
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-base);
  line-height: 1.7;
  color: var(--tle-text);
}

/* Small category labels / badges */
.tle-badge {
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tle-olive);
  display: inline-block;
}

/* Links */
.tle-site a {
  color: var(--tle-orange);
  text-decoration: none;
  transition: color 0.2s ease;
}
.tle-site a:hover {
  color: var(--tle-olive);
}


/* ----- UTILITY ----- */
.tle-container {
  width: 100%;
  max-width: var(--tle-max-width);
  margin: 0 auto;
  padding: 0 var(--tle-gap);
}

.tle-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* ----- HEADER ----- */
.tle-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--tle-aubergine);
  height: var(--tle-header-h);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}
.tle-header.tle-header--hidden {
  transform: translateY(-100%);
}
.tle-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--tle-max-width);
  margin: 0 auto;
  padding: 0 var(--tle-gap);
}

/* Desktop nav */
.tle-nav {
  display: flex;
  align-items: center;
  gap: var(--tle-gap);
  list-style: none;
}
.tle-nav a {
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-sm);
  font-weight: 500;
  color: var(--tle-ivory);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.tle-nav a:hover {
  color: var(--tle-orange);
}

/* Burger button */
.tle-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.tle-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--tle-orange);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.tle-burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.tle-burger.active span:nth-child(2) {
  opacity: 0;
}
.tle-burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.tle-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--tle-header-h);
  background: var(--tle-aubergine);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--tle-gap-lg);
}
.tle-mobile-nav.active {
  display: flex;
}
.tle-mobile-nav a {
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-lg);
  font-weight: 500;
  color: var(--tle-ivory);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}
.tle-mobile-nav a:hover {
  color: var(--tle-orange);
}


/* ----- HERO / INTRO SECTION ----- */
.tle-hero {
  text-align: center;
  padding: 4rem var(--tle-gap) 2.5rem;
}
.tle-hero h1 {
  font-size: var(--tle-font-2xl);
  color: var(--tle-text);
  margin-bottom: 0.75rem;
}
.tle-hero p {
  font-size: var(--tle-font-md);
  color: var(--tle-taupe);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}


/* ----- SECTION TITLES ----- */
.tle-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--tle-font-xl);
  text-align: center;
  margin-bottom: var(--tle-gap-lg);
  color: var(--tle-text);
}


/* ----- CARD GRID (PINTEREST-STYLE) ----- */
.tle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tle-gap);
  padding: 0 0 3rem;
}

.tle-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--tle-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(43, 24, 39, 0.12);
}

/* Thumbnail wrapper — enforces 2:3 ratio */
.tle-card-img {
  position: relative;
  width: 100%;
  padding-bottom: 150%; /* 2:3 ratio */
  overflow: hidden;
  background: var(--tle-taupe);
}
.tle-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.tle-card:hover .tle-card-img img {
  transform: scale(1.03);
}

/* Card text area */
.tle-card-body {
  padding: 0.85rem 0.25rem 1rem;
}
.tle-card-body .tle-badge {
  margin-bottom: 0.35rem;
}
.tle-card-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tle-text);
}


/* ----- CATEGORY PAGE HEADER ----- */
.tle-category-header {
  text-align: center;
  padding: 3.5rem var(--tle-gap) 2rem;
}
.tle-category-header h1 {
  font-size: var(--tle-font-2xl);
  margin-bottom: 0.6rem;
}
.tle-category-header p {
  font-size: var(--tle-font-md);
  color: var(--tle-taupe);
  max-width: 560px;
  margin: 0 auto;
}


/* ----- ARTICLE / SINGLE POST ----- */
.tle-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem var(--tle-gap) 4rem;
}
.tle-article-header {
  text-align: center;
  margin-bottom: 2rem;
}
.tle-article-header .tle-badge {
  margin-bottom: 0.5rem;
}
.tle-article-header h1 {
  font-size: var(--tle-font-2xl);
  margin-bottom: 1rem;
}

/* Affiliate disclosure */
.tle-disclosure {
  font-size: var(--tle-font-xs);
  color: var(--tle-taupe);
  text-align: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--tle-taupe);
  border-bottom: 1px solid var(--tle-taupe);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Main collage image */
.tle-collage {
  width: 100%;
  margin-bottom: 2rem;
  border-radius: var(--tle-radius);
  overflow: hidden;
}
.tle-collage img {
  width: 100%;
  height: auto;
  display: block;
}

/* Short intro */
.tle-article-intro {
  font-size: var(--tle-font-md);
  color: var(--tle-text);
  text-align: center;
  margin-bottom: 2.5rem;
  font-style: italic;
}


/* ----- PRODUCT LIST ----- */
.tle-products {
  display: flex;
  flex-direction: column;
  gap: var(--tle-gap-lg);
}

.tle-product {
  display: flex;
  gap: var(--tle-gap);
  align-items: flex-start;
  padding-bottom: var(--tle-gap-lg);
  border-bottom: 1px solid var(--tle-taupe);
}
.tle-product:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tle-product-img {
  width: 140px;
  min-width: 140px;
  aspect-ratio: 1 / 1;
  border-radius: var(--tle-radius);
  overflow: hidden;
  background: var(--tle-ivory-pale);
}
.tle-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tle-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tle-product-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}
.tle-product-info .tle-product-note {
  font-size: var(--tle-font-sm);
  color: var(--tle-taupe);
  font-style: italic;
}
.tle-product-info .tle-product-price {
  font-size: var(--tle-font-sm);
  font-weight: 600;
  color: var(--tle-olive);
}

/* Amazon CTA button */
.tle-btn {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.4rem;
  border-radius: var(--tle-radius);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-top: 0.5rem;
  align-self: flex-start;
}
.tle-btn-olive {
  background: var(--tle-olive);
  color: #fff;
}
.tle-btn-olive:hover {
  background: var(--tle-olive-muted);
  color: #fff;
}
.tle-btn-orange {
  background: var(--tle-orange);
  color: #fff;
}
.tle-btn-orange:hover {
  background: #e85d20;
  color: #fff;
}


/* ----- RELATED EDITS ----- */
.tle-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--tle-taupe);
}
.tle-related h2 {
  font-size: var(--tle-font-xl);
  text-align: center;
  margin-bottom: var(--tle-gap);
}
.tle-related .tle-grid {
  grid-template-columns: repeat(3, 1fr);
}


/* ----- FOOTER ----- */
.tle-footer {
  background: var(--tle-aubergine);
  padding: 3rem var(--tle-gap);
  color: var(--tle-ivory);
}
.tle-footer-inner {
  max-width: var(--tle-max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--tle-gap-lg);
}
.tle-footer-brand .tle-logo {
  margin-bottom: 0.75rem;
}
.tle-footer-brand p {
  color: var(--tle-taupe);
  font-size: var(--tle-font-sm);
  max-width: 280px;
}
.tle-footer-links h4 {
  font-family: 'Manrope', sans-serif;
  font-size: var(--tle-font-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tle-orange);
  margin-bottom: 0.75rem;
}
.tle-footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tle-footer-links a {
  font-size: var(--tle-font-sm);
  color: var(--tle-ivory);
}
.tle-footer-links a:hover {
  color: var(--tle-orange);
}
.tle-footer-bottom {
  width: 100%;
  text-align: center;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(243, 233, 215, 0.15);
  font-size: var(--tle-font-xs);
  color: var(--tle-taupe);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .tle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tle-related .tle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tle-nav {
    display: none;
  }
  .tle-burger {
    display: flex;
  }
  .tle-site h1 { font-size: var(--tle-font-xl); }
  .tle-site h2 { font-size: var(--tle-font-lg); }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --tle-header-h: 60px;
  }
  .tle-grid {
    grid-template-columns: 1fr;
  }
  .tle-related .tle-grid {
    grid-template-columns: 1fr;
  }
  .tle-hero {
    padding: 2.5rem var(--tle-gap) 1.5rem;
  }
  .tle-hero h1 {
    font-size: var(--tle-font-lg);
  }
  .tle-product {
    flex-direction: column;
  }
  .tle-product-img {
    width: 100%;
    min-width: unset;
    aspect-ratio: 4 / 3;
  }
  .tle-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .tle-footer-brand p {
    max-width: 100%;
  }
}
