/*
Theme Name:  GoodsFrame
Theme URI:   https://goodsframe.com
Description: Motyw katalogu produktów GoodsFrame
Version:     1.0.0
Author:      GoodsFrame
Text Domain: goodsframe
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --cream:       #FBF7E4;
  --cream-dark:  #F2EBD9;
  --cream-light: #FBF7E4;
  --brown:       #430A0A;
  --brown-mid:   #6B2010;
  --orange:      #FA5120;
  --orange-light:#FB6E40;
  --text:        #430A0A;
  --text-mid:    #6B4040;
  --text-light:  #9B7070;
  --border:      #E8DFC8;
  --border-light:#F0E8D4;
  --white:       #FFFFFF;
  --green:       #2E7D4F;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow-sm:   0 1px 4px rgba(67,10,10,.06);
  --shadow-md:   0 4px 16px rgba(67,10,10,.10);
  --shadow-lg:   0 8px 32px rgba(67,10,10,.14);

  --font-display: 'Google Sans Flex', 'DM Sans', sans-serif;
  --font-body:    'Google Sans Flex', 'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --max-w:       1280px;
  --gap:         24px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brown);
  line-height: 1.2;
}

h1 { font-size: 48px; font-weight: 700; }
h2 { font-size: 36px; font-weight: 400; }
h3 { font-size: 1.25rem; font-weight: 400; }

p { color: var(--text-mid); line-height: 1.7; font-weight: 400; }

/* ============================================================
   LAYOUT
   ============================================================ */
.gf-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.gf-page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.gf-header {
  background: var(--cream);
}

.gf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.gf-logo {
  display: inline-flex;
  align-items: center;
  transition: opacity .2s;
}
.gf-logo:hover { opacity: .85; }

.gf-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.gf-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  transition: color .15s;
}
.gf-nav a:hover { color: var(--orange); }

/* ============================================================
   FOOTER
   ============================================================ */
.gf-footer {
  background: var(--cream);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.gf-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
  align-items: center;
}

.gf-footer__brand p {
  font-size: .85rem;
  color: var(--text-light);
  margin-top: 10px;
}

.gf-footer__cta h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brown);
  margin-bottom: 8px;
}

.gf-footer__cta p {
  font-size: .9rem;
  margin-bottom: 6px;
}

.gf-footer__cta a {
  color: var(--orange);
  font-weight: 500;
}
.gf-footer__cta a:hover { text-decoration: underline; }

.gf-footer__note {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 6px;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.gf-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.gf-card:hover { box-shadow: 0 4px 16px rgba(67,10,10,.10); }
.gf-card__thumb {
    overflow: hidden;
    background: #f5f0e8;
    line-height: 0;
	aspect-ratio: unset !important;
    height: auto !important;
}
.gf-card__thumb img {
    width: 100% !important;
    height: auto !important;
    object-fit: unset !important;
    display: block;
    transition: transform .3s;
}
.gf-card:hover .gf-card__thumb img { transform: scale(1.02); }
.gf-card__no-thumb {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light); font-size: .8rem; padding: 12px; text-align: center;
}
.gf-card__body {
    background: #fff;
    padding: 10px 12px 14px;
    flex: 1;
}
.gf-card__cat {
    font-size: .75rem;
    font-weight: 600;
    color: var(--orange);
    margin-bottom: 4px;
}
.gf-card__title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--brown);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gf-card__meta {
    font-size: .78rem;
    font-weight: 400;
    color: var(--text-light);
}

.gf-card__flag {
  width: 18px;
  height: 12px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

/* ============================================================
   PRODUCT GRID (masonry-like columns)
   ============================================================ */

.gf-grid {
  columns: 6;
  column-gap: 12px;
}
.gf-grid .gf-card {
  break-inside: avoid;
  margin-bottom: 12px;
  display: block;
}

@media (max-width: 1100px) { .gf-grid { columns: 5; } }
@media (max-width: 860px)  { .gf-grid { columns: 4; } }
@media (max-width: 600px)  { .gf-grid { columns: 3; } }
@media (max-width: 380px)  { .gf-grid { columns: 2; } }

/* ============================================================
   KAFELKI (pola produktu)
   ============================================================ */
.gf-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.gf-tile {
  background: #fff;
  padding: 12px 16px;
}

.gf-tile__label {
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .5px;
  color: #430A0A;
  margin-bottom: 4px;
}

.gf-tile__value {
  font-size: .95rem;
  font-weight: 600;
  color: var(--brown);
}

/* ============================================================
   LINKI KLIKALNE (marki, kategorie, kraj, tagi)
   ============================================================ */
.gf-link {
  display: inline-block;
  font-weight: 600;
  transition: color .15s;
}
.gf-link--marka {
  /*color: var(--orange);*/
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gf-link--marka:hover { color: var(--orange-light); }

.gf-link--kategoria, .gf-link--kraj {
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gf-link--kategoria:hover, .gf-link--kraj:hover { color: var(--orange); }

.gf-separator { color: var(--text-light); margin: 0 4px; font-weight: 400; }

/* Tagi */
.gf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.gf-tag {
  display: inline-block;
  border: 1px solid #FA5120;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .82rem;
  color: #FA5120;
  transition: border-color .15s, color .15s, background .15s;
}
.gf-tag:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(232,71,10,.05);
}

/* ============================================================
   BOX "Znalazłeś produkt..."
   ============================================================ */
.gf-missing-box {
  background: #fff;
  padding: 20px 24px;
  margin-top: 24px;
}
.gf-missing-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 8px;
}
.gf-missing-box p { font-size: .88rem; margin-bottom: 4px; }
.gf-missing-box a { color: var(--orange); font-weight: 500; }
.gf-missing-box a:hover { text-decoration: underline; }
.gf-missing-box__note {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================
   STRONA MARKI – zakładki sekcji
   ============================================================ */
.gf-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.gf-tab {
  padding: 10px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-mid);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.gf-tab:hover { color: var(--brown); }
.gf-tab.active {
  color: var(--brown);
  border-bottom-color: var(--brown);
}

.gf-tab-count {
  display: inline-block;
  background: var(--cream-dark);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: .75rem;
  font-weight: 600;
  margin-left: 5px;
  color: var(--text-mid);
}

/* Statystyki marki (duże liczby) */
.gf-brand-stats {
  display: flex;
  gap: 5px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.gf-brand-stat { text-align: center; background: #fff; padding: 12px 12px; }
.gf-brand-stat__num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #430a0a;
  line-height: 1;
}
.gf-brand-stat__label {
  font-size: .78rem;
  color: #430a0a;
  margin-top: 3px;
  font-weight: bold;
}

/* ============================================================
   FILTRY
   ============================================================ */
.gf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  padding: 0;
  background: transparent;
  border: none;
}

.gf-filter-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #430A0A;
  white-space: nowrap;
}

.gf-filter-select {
  appearance: none;
  background: #fff;
  border: 1px solid #430A0A;
  border-radius: 0;
  padding: 11px 12px;
  font-size: .88rem;
  font-weight: bold;
  font-family: var(--font-body);
  color: var(--text);
  cursor: pointer;
  min-width: 140px;
  transition: border-color .15s;
}
.gf-filter-select:focus { outline: none; border-color: var(--orange); }

.gf-sort-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gf-sort-wrap .gf-dropdown-trigger {
    min-width: 180px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.gf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 32px 0;
    flex-wrap: wrap;
}

.gf-pagination a,
.gf-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: .9rem;
    color: var(--text-light);
    text-decoration: none;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    white-space: nowrap;
}

.gf-pagination a:hover {
    color: var(--brown);
}

.gf-pagination span.current {
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    min-width: 36px;
    height: 36px;
}

.gf-pagination span.dots {
    background: none;
    color: var(--text-light);
    cursor: default;
}

.gf-pagination a[data-page]:first-child,
.gf-pagination a[data-page]:last-child {
    border-radius: 4px;
    padding: 0 12px;
    color: var(--text-light);
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.gf-search-header {
  text-align: center;
  padding: 48px 0 36px;
}
.gf-search-header h1 { margin-bottom: 8px; }
.gf-search-header p { color: var(--text-light); font-size: .95rem; }

.gf-search-box {
  display: flex;
  gap: 0;
  max-width: 560px;
  margin: 20px auto 0;
  border: 1px solid #430A0A;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s;
}
.gf-search-box:focus-within { border-color: var(--orange); }

.gf-search-input {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
}
.gf-search-input:focus { outline: none; }
.gf-search-input::placeholder {   color: #C0C0C0; }

.gf-search-btn {
  background: none;
  border: none;
  border-left: none;
  padding: 0 18px;
  cursor: pointer;
  color: var(--brown);
  font-size: 1.1rem;
  transition: color .15s;
}
.gf-search-btn:hover { color: var(--orange); }

/* ============================================================
   SINGLE PRODUKT – layout
   ============================================================ */
.gf-single {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 48px;
  padding: 48px 0;
  align-items: start;
}

.gf-single__gallery {
  /* bez sticky */
}

.gf-gallery__main {
  overflow: hidden;
  background: var(--cream-dark);
  margin-bottom: 10px;
}
.gf-gallery__main img,
.gf-gallery__main video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.gf-gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.gf-gallery__thumb {
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s;
  line-height: 0;
}
.gf-gallery__thumb.active { border-color: var(--orange); }
.gf-gallery__thumb img { width: 100%; height: auto; display: block; }

.gf-single__info h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 14px;
}
.gf-single__info {
  position: sticky;
  top: 50px;
  align-self: start;
}
.gf-single__desc {
  font-size: .95rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 4px;
}

/* Powiązane */
.gf-related { margin-top: 64px; }
.gf-related__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 24px;
}

/* ============================================================
   STRONA GŁÓWNA – hero
   ============================================================ */
.gf-hero {
  padding: 56px 0 40px;
  text-align: center;
}
.gf-hero h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 14px;
  line-height: 1.15;
}
.gf-hero p {
  max-width: 540px;
  margin: 0 auto 8px;
  font-size: 1rem;
  color: var(--text-mid);
}

/* ============================================================
   SEKCJE KATEGORII (strona główna – mega menu)
   ============================================================ */
.gf-category-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px!important;
    border-bottom: none!important;
    margin-bottom: 0;
	padding-bottom:10px;
}
.gf-cat-tab {
    background: #fff!important;
    border: none;
    border-radius: 0;
    padding: 10px 22px 7px 22px!important;
    border-bottom: 3px solid transparent;
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center!important;
    transition: border-color .15s;
}
.gf-cat-tab-name {
    font-size: .92rem;
    font-weight: 700;
    color: #430A0A;
    line-height: 1.2;
}
.gf-cat-tab-count {
    font-size: .82rem;
    font-weight: 400;
    color: #430A0A;
}
.gf-cat-tab:hover { border-bottom-color: #430A0A; }
.gf-cat-tab.active {
    border-bottom: 3px solid #430A0A;
}
.gf-cat-tab.active .gf-cat-tab-name { font-weight: 700; }
.gf-subcats {
  background: var(--brown);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px!important;
  margin-bottom: 24px;
}
.gf-subcat-label {
  font-size: 1rem!important;
  font-weight: 600;
  text-transform: none!important;
  letter-spacing: .5px;
  color: #FBF7E4!important;
  align-self: center;
  margin-right: 4px;
}
.gf-subcat-btn {
    border: 1px solid #FBF7E4;
    border-radius: 0;
    background: none;
    padding: 8px 16px;
    color: #FBF7E4;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background .15s;
    white-space: nowrap;
    text-transform: capitalize;
}
.gf-subcat-btn:hover, .gf-subcat-btn.active {
    background: rgba(251,247,228,.15);
    border-color: #FBF7E4;
}
.gf-subcat-btn .gf-subcat-count {
    font-weight: 400;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.gf-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 20px;
}

.gf-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 4px;
}

.gf-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
.gf-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #430A0A;
    background: #fff;
    cursor: pointer;
    font-size: .88rem;
    font-family: var(--font-body);
    color: var(--text);
    min-width: 140px;
    user-select: none;
}
.gf-dropdown-trigger.active {
    font-weight: 700;
}

.gf-page-content ol,
.gf-page-content ul {
    padding-left: 24px;
    margin-bottom: 16px;
    line-height: 1.8;
}

.gf-page-content ol {
    list-style: decimal;
}

.gf-page-content ul {
    list-style: disc;
}

.gf-page-content li {
    margin-bottom: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .gf-single {
    grid-template-columns: 1fr;
  }
  .gf-single__gallery { position: static; }
  .gf-tiles { grid-template-columns: repeat(2, 1fr); }
  .gf-footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .gf-hero__counts { flex-direction: column; border-radius: var(--radius-lg); }
  .gf-hero__count { border-right: none; border-bottom: 1.5px solid var(--border); }
  .gf-hero__count:last-child { border-bottom: none; }
  .gf-brand-stats { gap: 16px; }
}

@media (max-width: 600px) {
  :root { --gap: 16px; }
  .gf-tiles { grid-template-columns: 1fr 1fr; }
  .gf-nav { gap: 16px; }
}

/* ============================================================
   DROPDOWNY Z CHECKBOXAMI
   ============================================================ */
.gf-dropdown-wrap {
    position: relative;
}
.gf-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #430A0A;
    background: #fff;
    cursor: pointer;
    font-size: .88rem;
    font-family: var(--font-body);
    color: var(--text);
    min-width: 140px;
    user-select: none;
}
.gf-dropdown-trigger.active { font-weight: 700; }
.gf-dropdown-trigger .gf-dd-label { flex: 1; font-weight: bold; }
.gf-dropdown-trigger .gf-dd-clear {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1;
    margin-right: 2px;
}
.gf-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid #430A0A;
    min-width: 220px;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(67,10,10,.12);
}
.gf-dd-search {
    width: 100%;
    border: 1px solid #ddd;
    padding: 6px 10px;
    font-size: .85rem;
    margin-bottom: 8px;
    font-family: var(--font-body);
    color: var(--text);
    outline: none;
}
.gf-dd-search:focus { border-color: #430A0A; }
.gf-dd-search::placeholder { color: #C0C0C0; }
.gf-dd-list { max-height: 200px; overflow-y: auto; }
.gf-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    font-size: .88rem;
    cursor: pointer;
    color: var(--text);
}
.gf-dd-item:hover { background: #faf6ed; }
.gf-dd-item input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: #430A0A;
    cursor: pointer;
    flex-shrink: 0;
}
.gf-dd-item.checked { font-weight: 600; }

/* ============================================================
   STRONA CHRONIONA HASŁEM
   ============================================================ */
.post-password-form p { margin-bottom: 16px; }

.post-password-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--brown);
    max-width: 400px;
}

.post-password-form input[type="password"] {
    padding: 12px 14px;
    border: 1px solid #430A0A;
    border-radius: 0;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--cream);
    outline: none;
    width: 100%;
}

.post-password-form input[type="password"]:focus {
    border-color: var(--orange);
}

.post-password-form input[type="submit"] {
    margin-top: 12px;
    padding: 12px 32px;
    background: #FA5120;
    color: #fff;
    border: none;
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    border-radius: 0;
    transition: background .15s;
}

.post-password-form input[type="submit"]:hover {
    background: #e04010;
}
