/* static/css/core/home.css */

/* =========================================================
   Home page styles (SushiTime)
   Blocks:
   - HERO + info cards
   - Product cards (rolls/sets): home-grid + p-card + badges
   - Blog: post-hero + post-card
   Uses Bootstrap base, but styles are standalone.
   ========================================================= */

:root{
  --st-accent: #ff4d4f;
  --st-accent-2:#ff8a00;
  --st-text:#111;
  --st-muted:#6b7280;
  --st-border: rgba(17,17,17,.08);
  --st-card:#fff;
  --st-shadow: 0 18px 40px rgba(0,0,0,.10);
  --st-shadow-sm: 0 10px 24px rgba(0,0,0,.08);
  --st-radius: 16px;
  --st-radius-sm: 12px;
}

/* -------------------------
   Buttons (site-like)
   ------------------------- */
.st-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:44px;
  padding:0 16px;
  border-radius:14px;
  font-weight:900;
  text-transform:none;
  letter-spacing:.2px;
  border:1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.st-btn:active{ transform: translateY(1px); }
.st-btn--sm{
  height:38px;
  border-radius:12px;
  padding:0 14px;
  font-weight:900;
}
.st-btn--primary{
  color:#fff !important;
  border:0;
  background: linear-gradient(90deg, var(--st-accent) 0%, var(--st-accent-2) 100%);
  box-shadow: 0 10px 22px rgba(255,77,79,.22);
}
.st-btn--primary:hover{
  box-shadow: 0 14px 30px rgba(255,77,79,.28);
  transform: translateY(-1px);
}
.st-btn--outline{
  color: var(--st-text) !important;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--st-border);
  backdrop-filter: blur(6px);
}
.st-btn--outline:hover{
  border-color: rgba(17,17,17,.16);
  box-shadow: var(--st-shadow-sm);
  transform: translateY(-1px);
}

/* -------------------------
   HERO
   ------------------------- */
.home-hero{
  border-radius: var(--st-radius);
  background:
    radial-gradient(1200px 220px at 20% -30%, rgba(255,77,79,.35) 0%, rgba(255,77,79,0) 60%),
    radial-gradient(900px 260px at 85% 10%, rgba(255,138,0,.28) 0%, rgba(255,138,0,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.86));
  border:1px solid var(--st-border);
  overflow:hidden;
  box-shadow: var(--st-shadow-sm);
}
.home-hero__content{
  padding: 28px;
}
.home-hero__badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  background: rgba(17,17,17,.06);
  border:1px solid rgba(17,17,17,.08);
  font-weight:900;
  font-size:12px;
  color: rgba(17,17,17,.82);
}
.home-hero__title{
  margin: 14px 0 8px;
  font-weight: 1000;
  color: var(--st-text);
  line-height: 1.15;
}
.home-hero__text{
  margin: 0;
  color: var(--st-muted);
  font-weight:700;
  max-width: 680px;
}
.home-hero__actions{
  margin-top: 16px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

/* -------------------------
   Info cards
   ------------------------- */
.home-info{
  height:100%;
  padding:16px 16px;
  border-radius: var(--st-radius-sm);
  background: var(--st-card);
  border:1px solid var(--st-border);
  box-shadow: var(--st-shadow-sm);
}
.home-info__title{
  font-weight:1000;
  color: var(--st-text);
  margin-bottom: 6px;
}
.home-info__text{
  color: var(--st-muted);
  font-weight:700;
  margin:0;
}
.home-info__link{
  display:inline-flex;
  margin-top: 8px;
  font-weight: 900;
  text-decoration:none;
  color: var(--st-text);
  opacity:.92;
}
.home-info__link:hover{ opacity:1; text-decoration: underline; }

/* -------------------------
   Section headers
   ------------------------- */
.home-block{ margin-top: 22px; }
.home-block__head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}
.home-block__title{
  margin:0;
  font-weight:1000;
  color: var(--st-text);
}
.home-block__link{
  font-weight:900;
  color: rgba(17,17,17,.82);
  text-decoration:none;
}
.home-block__link:hover{ text-decoration: underline; }

/* -------------------------
   Product grid (3/2/1)
   ------------------------- */
.home-grid{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1199px){
  .home-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px){
  .home-grid{ grid-template-columns: 1fr; }
}

/* -------------------------
   Product card
   ------------------------- */
.p-card{
  border-radius: var(--st-radius);
  background: var(--st-card);
  border:1px solid var(--st-border);
  box-shadow: var(--st-shadow-sm);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 100%;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.p-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--st-shadow);
  border-color: rgba(17,17,17,.14);
}
.p-card__media{
  position:relative;
  display:block;
  aspect-ratio: 4 / 3;
  background: rgba(17,17,17,.04);
  overflow:hidden;
}
.p-card__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.01);
  transition: transform .18s ease;
}
.p-card:hover .p-card__img{ transform: scale(1.05); }
.p-card__ph{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:1000;
  color: rgba(17,17,17,.35);
}
.p-card__badges{
  position:absolute;
  left:10px;
  top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.p-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:1000;
  color:#fff;
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
}
.p-badge--top{ background: linear-gradient(90deg, #111, #333); }
.p-badge--new{ background: linear-gradient(90deg, #22c55e, #16a34a); }
.p-badge--sale{ background: linear-gradient(90deg, var(--st-accent), var(--st-accent-2)); }

.p-card__body{
  padding: 14px 14px 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex: 1 1 auto;
}
.p-card__title{
  font-weight:1000;
  color: var(--st-text);
  text-decoration:none;
  line-height:1.2;
  min-height: 2.4em; /* ровнее высота заголовка */
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.p-card__title:hover{ text-decoration: underline; }

.p-card__meta{
  color: var(--st-muted);
  font-weight:800;
  font-size: 12.5px;
  min-height: 18px;
}
.p-card__price{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-top: 2px;
}
.p-price__now{
  font-weight:1000;
  color: var(--st-text);
  font-size: 18px;
}
.p-price__old{
  font-weight:900;
  color: rgba(17,17,17,.45);
  text-decoration: line-through;
  font-size: 13px;
}

.p-card__actions{
  margin-top: auto;
  display:grid;
  grid-template-columns: 1fr 44px; /* корзина + избранное-иконка */
  gap:10px;
}
@media (max-width: 576px){
  .p-card__actions{
    grid-template-columns: 1fr 44px;
  }
}

/* button in cards */
.p-btn{
  width:100%;
  height:38px;
  border-radius:12px;
  font-weight:1000;
}
.p-btn--icon{
  width:44px;
  padding:0;
  font-size:16px;
}

/* If set cards have 2 buttons (cart + open) - keep nice */
.p-card .p-card__actions a.p-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* -------------------------
   BLOG (hero + cards)
   ------------------------- */
.post-hero{
  border-radius: var(--st-radius);
  overflow:hidden;
  border:1px solid var(--st-border);
  box-shadow: var(--st-shadow-sm);
  background: #111;
}
.post-hero__media{
  position:relative;
  display:block;
  text-decoration:none;
  color:#fff;
  aspect-ratio: 16 / 6;
  min-height: 220px;
}
.post-hero__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter: saturate(1.05);
  transform: scale(1.02);
}
.post-hero__img--ph{
  background:
    radial-gradient(900px 220px at 20% 0%, rgba(255,77,79,.55), rgba(255,77,79,0) 60%),
    radial-gradient(700px 260px at 80% 10%, rgba(255,138,0,.45), rgba(255,138,0,0) 60%),
    linear-gradient(135deg, #111, #2a2a2a);
}
.post-hero__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.75) 75%, rgba(0,0,0,.88) 100%);
}
.post-hero__content{
  position:absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index:2;
  max-width: 760px;
}
.post-hero__meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 8px;
  flex-wrap:wrap;
}
.post-hero__pill{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  font-weight:1000;
  font-size:12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
}
.post-hero__date{
  font-weight: 900;
  font-size: 12px;
  opacity:.92;
}
.post-hero__title{
  font-weight: 1100;
  line-height: 1.15;
  font-size: 24px;
  margin-bottom: 6px;
}
.post-hero__text{
  font-weight: 700;
  opacity:.94;
  margin:0;
  max-width: 680px;
}
.post-hero__actions{ margin-top: 12px; }
.post-hero .st-btn--primary{ height: 38px; border-radius: 12px; }

@media (max-width: 576px){
  .post-hero__media{ aspect-ratio: 16/9; }
  .post-hero__title{ font-size: 20px; }
}

/* Blog card */
.post-card{
  border-radius: var(--st-radius);
  border:1px solid var(--st-border);
  background: var(--st-card);
  overflow:hidden;
  box-shadow: var(--st-shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  height:100%;
  display:flex;
  flex-direction:column;
}
.post-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--st-shadow);
  border-color: rgba(17,17,17,.14);
}
.post-card__img{
  display:block;
  aspect-ratio: 16/9;
  background: rgba(17,17,17,.04);
  overflow:hidden;
}
.post-card__img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition: transform .18s ease;
}
.post-card:hover .post-card__img img{ transform: scale(1.05); }
.post-card__ph{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:1000;
  color: rgba(17,17,17,.35);
  background:
    radial-gradient(700px 220px at 30% 0%, rgba(255,77,79,.22), rgba(255,77,79,0) 60%),
    radial-gradient(700px 260px at 80% 20%, rgba(255,138,0,.18), rgba(255,138,0,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.86));
}
.post-card__ph span{ opacity:.9; }

.post-card__body{
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1 1 auto;
}
.post-card__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color: var(--st-muted);
  font-weight:900;
  font-size: 12px;
}
.post-card__cat{
  padding: 5px 10px;
  border-radius:999px;
  background: rgba(17,17,17,.06);
  border:1px solid rgba(17,17,17,.08);
}
.post-card__title{
  font-weight:1000;
  color: var(--st-text);
  text-decoration:none;
  line-height:1.2;
  min-height: 2.4em;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.post-card__title:hover{ text-decoration: underline; }
.post-card__text{
  color: var(--st-muted);
  font-weight:700;
  font-size: 13px;
  min-height: 3.2em;
}
.post-card__more{
  margin-top:auto;
  font-weight:1000;
  color: rgba(17,17,17,.88);
  text-decoration:none;
}
.post-card__more:hover{ text-decoration: underline; }

/* -------------------------
   Small spacing helpers
   ------------------------- */
.mb-30{ margin-bottom: 18px !important; } /* your theme uses mb-30 sometimes */