/*
Theme Name: TinyFriends
Theme URI: https://tinyfriends-ks.com
Author: TinyFriends
Description: Temë e personalizuar për dyqan produktesh për bebe dhe fëmijë, e plotësuar me WooCommerce. E gjitha e kontrollueshme nga paneli i administrimit.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: tinyfriends
*/

:root {
  --tf-primary: #8b5e3c;
  --tf-primary-dark: #6f4a2f;
  --tf-secondary: #dfc9a8;
  --tf-accent: #a65b2f;
  --tf-ink: #3e2c1c;
  --tf-ink-soft: #6f5c48;
  --tf-bg: #faf4ea;
  --tf-white: #ffffff;
  --tf-primary-soft: #f2e9dc;
  --tf-secondary-soft: #f6eddf;
  --tf-accent-soft: #f3e6d7;
  --tf-radius: 18px;
  --tf-radius-sm: 12px;
  --tf-shadow: 0 8px 24px rgba(62, 44, 28, 0.09);
  --tf-shadow-lg: 0 16px 40px rgba(62, 44, 28, 0.15);
  --tf-heading-font: 'Baloo 2', 'Comic Sans MS', sans-serif;
  --tf-body-font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--tf-body-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--tf-ink);
  background: var(--tf-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--tf-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--tf-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tf-heading-font);
  color: var(--tf-ink);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 700;
}

p { margin: 0 0 1.2em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--tf-primary); color: #fff; padding: 10px 16px; z-index: 9999;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}

.tf-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.tf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tf-secondary); color: var(--tf-ink);
  font-family: var(--tf-heading-font); font-weight: 700; font-size: 17px;
  padding: 13px 30px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(139, 94, 60, 0.35);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.tf-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(139, 94, 60, 0.45); color: var(--tf-ink); background: #d3ba92; }
.tf-btn--primary { background: var(--tf-primary); color: #fff; box-shadow: 0 6px 16px rgba(139, 94, 60, .3); }
.tf-btn--primary:hover { background: var(--tf-primary-dark); color: #fff; box-shadow: 0 10px 22px rgba(111, 74, 47, .38); }
.tf-btn--accent { background: var(--tf-accent); color: #fff; box-shadow: 0 6px 16px rgba(166, 91, 47, .35); }
.tf-btn--accent:hover { background: #8d4c24; color: #fff; }
.tf-btn--ghost { background: transparent; color: var(--tf-ink); border: 2px solid var(--tf-ink); box-shadow: none; }
.tf-btn--ghost:hover { background: var(--tf-ink); color: #fff; }

.tf-section { padding: 70px 0; }
.tf-section--soft { background: var(--tf-white); }

.tf-section-head { text-align: center; max-width: 620px; margin: 0 auto 45px; }
.tf-section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 6px; }
.tf-section-head p { color: var(--tf-ink-soft); margin: 0; }
.tf-section-head h2::after {
  content: ''; display: block; width: 70px; height: 7px; margin: 12px auto 0;
  background: var(--tf-secondary); border-radius: 999px;
}

/* ---------- Announcement bar ---------- */
.tf-announcement {
  background: var(--tf-secondary); color: var(--tf-ink);
  text-align: center; font-weight: 800; font-size: 14.5px;
  padding: 9px 16px; letter-spacing: .2px;
  font-family: var(--tf-body-font);
}

/* ---------- Header ---------- */
.tf-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--tf-white);
  box-shadow: 0 2px 12px rgba(62, 44, 28, .08);
}
.tf-header.is-stuck { box-shadow: 0 6px 20px rgba(62, 44, 28, .14); }

.tf-header-inner {
  display: flex; align-items: center; gap: 20px; min-height: 74px; position: relative;
}

.tf-logo-text {
  font-family: var(--tf-heading-font); font-weight: 700; font-size: 27px;
  color: var(--tf-ink); line-height: 1; white-space: nowrap;
}
.tf-logo-text span { color: var(--tf-primary); }
.tf-logo img { max-height: 52px; width: auto; }

.tf-nav { margin-left: auto; }

.tf-menu {
  display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; align-items: center;
}
.tf-menu li { position: relative; }
.tf-menu a {
  display: block; padding: 9px 12px; color: var(--tf-ink);
  font-weight: 700; font-size: 15.5px; border-radius: 999px; font-family: var(--tf-body-font);
  white-space: nowrap;
}
.tf-menu a:hover, .tf-menu .current-menu-item > a { color: var(--tf-primary); background: var(--tf-primary-soft); }
.tf-menu .sub-menu {
  position: absolute; top: 100%; left: 8px; min-width: 220px; z-index: 10;
  background: var(--tf-white); border-radius: var(--tf-radius-sm);
  box-shadow: var(--tf-shadow-lg); padding: 8px; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease;
}
.tf-menu li:hover > .sub-menu, .tf-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tf-menu .sub-menu a { border-radius: 10px; padding: 9px 14px; font-size: 15.5px; }

.tf-header-actions { display: flex; align-items: center; gap: 8px; }

.tf-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--tf-primary-soft); color: var(--tf-primary-dark);
  transition: background .2s ease, transform .2s ease;
}
.tf-icon-btn:hover { background: var(--tf-primary); color: #fff; transform: translateY(-1px); }
.tf-icon-btn svg { width: 21px; height: 21px; }

.tf-cart { position: relative; }
.tf-cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; padding: 0 5px;
  background: var(--tf-accent); color: #fff; font-size: 12px; font-weight: 800;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--tf-white);
}

.tf-nav-toggle { display: none; }

.tf-search-bar {
  display: none; border-top: 1px solid #eee5d6; background: var(--tf-white); padding: 14px 0;
}
.tf-search-bar.is-open { display: block; }
.tf-search-bar form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.tf-search-bar input[type="search"] {
  flex: 1; padding: 12px 20px; border: 2px solid var(--tf-primary-soft);
  border-radius: 999px; font-size: 16px; font-family: inherit; outline: none;
}
.tf-search-bar input[type="search"]:focus { border-color: var(--tf-primary); }
.tf-search-bar button {
  border: none; background: var(--tf-primary); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 0 26px; cursor: pointer; font-size: 16px; font-family: var(--tf-body-font);
}

/* Mobile nav panel */
.tf-mobile-overlay {
  position: fixed; inset: 0; background: rgba(62, 44, 28, .5); z-index: 1001;
  opacity: 0; visibility: hidden; transition: all .25s ease;
}
.tf-mobile-overlay.is-open { opacity: 1; visibility: visible; }
.tf-mobile-panel {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 85vw); z-index: 1002;
  background: var(--tf-white); padding: 24px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--tf-shadow-lg);
}
.tf-mobile-panel.is-open { transform: translateX(0); }
.tf-mobile-panel .tf-menu { flex-direction: column; align-items: stretch; gap: 2px; }
.tf-mobile-panel .tf-menu a { font-size: 17px; padding: 12px 14px; }
.tf-mobile-panel .tf-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 14px; display: none; }
.tf-mobile-panel .tf-menu li.is-open > .sub-menu { display: block; }
.tf-mobile-close {
  position: absolute; top: 14px; right: 14px;
}
.tf-mobile-panel-title { font-family: var(--tf-heading-font); font-size: 22px; margin-bottom: 16px; }

/* ---------- Hero ---------- */
.tf-hero { position: relative; overflow: hidden; background: var(--tf-primary-soft); }
.tf-hero-track { position: relative; }
.tf-slide {
  position: relative; display: none; min-height: clamp(380px, 52vw, 560px);
  background-size: cover; background-position: center;
}
.tf-slide.is-active { display: block; animation: tfFadeIn .8s ease; }
@keyframes tfFadeIn { from { opacity: 0; } to { opacity: 1; } }

.tf-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(62, 44, 28, .62) 0%, rgba(62, 44, 28, .32) 55%, rgba(62, 44, 28, .06) 100%);
}
.tf-slide-inner {
  position: relative; z-index: 2; height: 100%; min-height: inherit;
  display: flex; align-items: center;
}
.tf-slide-content { max-width: 560px; padding: 40px 0; }
.tf-slide-content h2 {
  color: #fff; font-size: clamp(30px, 5.4vw, 54px); margin-bottom: 10px;
  text-shadow: 0 3px 14px rgba(0,0,0,.25);
}
.tf-slide-content p { color: #fff; font-size: clamp(17px, 2.2vw, 21px); text-shadow: 0 2px 10px rgba(0,0,0,.3); margin-bottom: 26px; }

.tf-hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--tf-ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--tf-shadow); transition: all .2s ease;
}
.tf-hero-arrow:hover { background: var(--tf-secondary); transform: translateY(-50%) scale(1.06); }
.tf-hero-arrow svg { width: 22px; height: 22px; }
.tf-hero-arrow--prev { left: 18px; }
.tf-hero-arrow--next { right: 18px; }

.tf-hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.tf-hero-dots button {
  width: 11px; height: 11px; border-radius: 999px; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.55); transition: all .25s ease;
}
.tf-hero-dots button.is-active { background: var(--tf-secondary); width: 28px; }

/* ---------- Category cards ---------- */
.tf-cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tf-cat-card {
  position: relative; border-radius: var(--tf-radius); overflow: hidden;
  box-shadow: var(--tf-shadow); background: var(--tf-white); display: block;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tf-cat-card:hover { transform: translateY(-6px); box-shadow: var(--tf-shadow-lg); }
.tf-cat-card img { width: 100%; height: 210px; object-fit: cover; transition: transform .4s ease; }
.tf-cat-card:hover img { transform: scale(1.05); }
.tf-cat-card-body { padding: 16px 20px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tf-cat-card-body h3 { margin: 0; font-size: 19px; }
.tf-cat-card-body .tf-cat-count {
  background: var(--tf-primary-soft); color: var(--tf-primary-dark);
  font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Products (WooCommerce base) ---------- */
.tf-products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0;
}

/* ---------- Testimonials ---------- */
.tf-testimonials { background: var(--tf-primary); }
.tf-testimonials .tf-section-head h2, .tf-testimonials .tf-section-head p { color: #fff; }
.tf-testimonials .tf-section-head h2::after { background: var(--tf-secondary); }
.tf-testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tf-testi-card {
  background: var(--tf-white); border-radius: var(--tf-radius); padding: 28px;
  box-shadow: var(--tf-shadow-lg); display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
.tf-testi-stars { color: #d9a441; font-size: 18px; letter-spacing: 3px; }
.tf-testi-text { margin: 0; color: var(--tf-ink-soft); font-size: 16px; flex: 1; }
.tf-testi-name { font-weight: 800; color: var(--tf-ink); font-family: var(--tf-heading-font); font-size: 17px; }
.tf-testi-name::before {
  content: ''; display: inline-block; width: 30px; height: 4px; background: var(--tf-accent);
  border-radius: 999px; margin-right: 10px; vertical-align: middle;
}

/* ---------- Footer ---------- */
.tf-footer { background: var(--tf-ink); color: rgba(255,255,255,.82); padding: 60px 0 0; margin-top: 70px; }
.tf-footer a { color: rgba(255,255,255,.82); }
.tf-footer a:hover { color: var(--tf-secondary); }
.tf-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.tf-footer h3 {
  color: #fff; font-size: 19px; margin-bottom: 18px; position: relative; padding-bottom: 10px;
}
.tf-footer h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 34px; height: 4px; background: var(--tf-secondary); border-radius: 999px; }
.tf-footer .tf-logo-text { color: #fff; font-size: 25px; display: inline-block; margin-bottom: 14px; }
.tf-footer ul { list-style: none; margin: 0; padding: 0; }
.tf-footer ul li { margin-bottom: 10px; }
.tf-footer ul a { font-size: 15.5px; }
.tf-footer-cats > li { margin-bottom: 12px; }
.tf-fcat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tf-fcat-head > a { font-weight: 700; color: #fff; flex: 1; }
.tf-fcat-toggle {
  background: none; border: none; cursor: pointer; padding: 2px;
  color: rgba(255, 255, 255, .7); display: inline-flex; transition: transform .25s ease;
}
.tf-fcat-toggle:hover { color: var(--tf-secondary); }
.tf-fcat-toggle svg { width: 16px; height: 16px; }
.tf-fcat.is-open .tf-fcat-toggle { transform: rotate(180deg); }
.tf-footer-subcats {
  display: none;
  list-style: none; margin: 8px 0 0 6px; padding: 0 0 0 12px;
  border-left: 2px solid rgba(255, 255, 255, .18);
}
.tf-fcat.is-open .tf-footer-subcats { display: block; }
.tf-footer-subcats li { margin-bottom: 5px; }
.tf-footer-subcats a { font-size: 14px; color: rgba(255, 255, 255, .75); }
.tf-footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.tf-footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 4px; color: var(--tf-secondary); }
.tf-footer-social { display: flex; gap: 10px; margin-top: 16px; }
.tf-footer-social a {
  width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); transition: all .2s ease;
}
.tf-footer-social a:hover { background: var(--tf-secondary); color: var(--tf-ink); }
.tf-footer-social svg { width: 18px; height: 18px; }
.tf-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center;
  font-size: 14.5px;
}

/* ---------- Content / page ---------- */
.tf-page-header {
  background: var(--tf-primary-soft); padding: 54px 0; text-align: center; margin-bottom: 50px;
}
.tf-page-header h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
.tf-page-header .tf-breadcrumbs { margin-top: 8px; color: var(--tf-ink-soft); font-size: 15px; }
.tf-page-header .tf-breadcrumbs a { color: var(--tf-primary-dark); font-weight: 700; }

.tf-entry { max-width: 800px; margin: 0 auto; padding: 0 20px 60px; }
.tf-entry--wide { max-width: 1200px; }

.tf-404 { text-align: center; padding: 100px 20px; }
.tf-404 h1 { font-size: clamp(60px, 12vw, 110px); color: var(--tf-primary); margin-bottom: 0; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], input[type="number"], textarea, select {
  width: 100%; padding: 12px 16px; border: 2px solid #e6dccb; border-radius: var(--tf-radius-sm);
  font-family: inherit; font-size: 16px; background: var(--tf-white); color: var(--tf-ink); outline: none;
  transition: border-color .2s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--tf-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .tf-nav { display: none; }
  .tf-nav-toggle { display: inline-flex; }
  .tf-header-inner { gap: 10px; }
}

@media (max-width: 1024px) {
  .tf-products-grid { grid-template-columns: repeat(3, 1fr); }
  .tf-footer-grid { grid-template-columns: 1fr 1fr; }
  .tf-cats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .tf-nav { display: none; }
  .tf-nav-toggle { display: inline-flex; }
  .tf-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .tf-testi-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .tf-products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tf-hero-arrow { display: none; }
  .tf-section { padding: 52px 0; }
}

@media (max-width: 480px) {
  .tf-cats-grid { gap: 14px; }
  .tf-cat-card img { height: 150px; }
  .tf-cat-card-body h3 { font-size: 16px; }
  .tf-cat-card-body { padding: 12px 14px; }
  .tf-footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .tf-header-inner { min-height: 64px; }
}
