/**
 * Dupa Theme – główne style (BEM)
 * Author: Klikon Media
 * Text Domain: dupa
 */

:root {
  --color-primary: #ff0000;
  --color-secondary: #000000;
  --color-accent: #f5c542;
  --color-white: #ffffff;
  --color-text: #333333;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container-max: 1200px;
  --header-height: 70px;
  --header-top-height: 40px;
  --transition-base: 0.2s ease;
}

/* ========== Base ========== */
.dupa-body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.5;
}

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

/* ========== Layout ========== */
.dupa-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ========== Header ========== */
.dupa-header {
  position: relative;
  z-index: 100;
  background: var(--color-white);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.dupa-header.dupa-header--sticky {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Gdy widoczny jest pasek admina WordPress – header sticky pod spodem */
body.admin-bar .dupa-header.dupa-header--sticky {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .dupa-header.dupa-header--sticky {
    top: 46px;
  }
}

/* Górna belka – kontakt + social */
.dupa-header__top {
  background: var(--color-secondary);
  color: var(--color-white);
}

.dupa-header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-top-height);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.dupa-header__contact {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dupa-header__contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color var(--transition-base);
}

.dupa-header__contact-item:hover {
  color: var(--color-accent);
}

.dupa-header__contact-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: var(--color-accent);
  flex-shrink: 0;
}

.dupa-header__contact-icon--phone {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.dupa-header__contact-icon--email {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.dupa-header__social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dupa-header__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color var(--transition-base);
}

.dupa-header__social-link:hover {
  color: var(--color-accent);
}

/* Główna belka */
.dupa-header__main {
  background: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dupa-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.dupa-header__brand {
  flex-shrink: 0;
}

.dupa-header__logo {
  display: block;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.dupa-header__logo:hover {
  color: var(--color-secondary);
}

.dupa-header__logo img {
  display: block;
  max-height: 50px;
  width: auto;
}

.dupa-header__site-title {
  font-size: 1.5rem;
}

.dupa-header__nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.dupa-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dupa-nav__item {
  position: relative;
}

.dupa-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color var(--transition-base), border-color var(--transition-base);
  border-bottom: 2px solid transparent;
}

.dupa-nav__link:hover,
.dupa-nav__item.current-menu-item .dupa-nav__link {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.dupa-nav__arrow {
  font-size: 0.6em;
  opacity: 0.8;
}

/* Dropdown */
.dupa-nav__item--has-dropdown .dupa-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 0.5rem 0;
  background: var(--color-white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
  z-index: 50;
}

.dupa-nav__item--has-dropdown:hover .dupa-nav__dropdown,
.dupa-nav__item--has-dropdown.dupa-nav__item--open .dupa-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dupa-nav__subitem {
  margin: 0;
}

.dupa-nav__sublink {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition-base), color var(--transition-base);
}

.dupa-nav__sublink:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-accent);
}

/* Przyciski CTA i ikony */
.dupa-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.dupa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.dupa-btn--primary {
  background: var(--color-accent);
  color: var(--color-secondary);
}

.dupa-btn--primary:hover {
  opacity: 0.95;
  color: var(--color-secondary);
}

.dupa-btn__icon--email {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.dupa-header__icon-link,
.dupa-header__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-base);
}

.dupa-header__icon-link:hover,
.dupa-header__icon-btn:hover {
  color: var(--color-accent);
}

.dupa-header__icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
}

.dupa-header__icon-link--cart .dupa-header__icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.dupa-header__icon-btn--search .dupa-header__icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.dupa-header__cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-accent);
  color: var(--color-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Żółty pasek boczny z plusem */
.dupa-header__strip {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  bottom: 0;
  background: var(--color-accent);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--header-top-height);
  pointer-events: none;
}

.dupa-header--no-top .dupa-header__strip {
  padding-top: 0;
}

.dupa-header__strip-btn {
  pointer-events: auto;
  width: 100%;
  height: 48px;
  padding: 0;
  background: var(--color-accent);
  border: none;
  color: var(--color-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base);
}

.dupa-header__strip-btn:hover {
  background: #e6b63d;
}

/* Overlay wyszukiwania */
.dupa-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.dupa-search-overlay[hidden] {
  display: none;
}

.dupa-search-overlay__inner {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.dupa-search-form {
  display: flex;
  gap: 0.5rem;
}

.dupa-search-form__input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--color-white);
  background: transparent;
  color: var(--color-white);
}

.dupa-search-form__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.dupa-search-form__submit {
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-secondary);
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.dupa-search-overlay__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dupa-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-secondary);
}

.dupa-nav-toggle__bar {
  width: 24px;
  height: 2px;
  background: currentColor;
}

@media (max-width: 991px) {
  .dupa-header__top {
    display: none;
  }
  .dupa-header__strip {
    padding-top: 0;
  }
  .dupa-header__nav {
    display: none;
  }
  .dupa-header__nav.dupa-header__nav--open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 60;
  }
  .dupa-header__nav.dupa-header__nav--open .dupa-nav {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  .dupa-nav__item--has-dropdown .dupa-nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .dupa-nav__item--has-dropdown.dupa-nav__item--open .dupa-nav__dropdown {
    max-height: 300px;
  }
}

@media (max-width: 767px) {
  .dupa-nav-toggle {
    display: flex;
  }
  .dupa-nav-toggle[hidden] {
    display: none;
  }
  .dupa-header__strip {
    width: 40px;
  }
  .dupa-header__cta .dupa-btn__text {
    display: none;
  }
}

/* ========== Main ========== */
.dupa-main {
  flex: 1;
}

.dupa-main--front {
  padding: 0;
}

.dupa-main--index {
  padding: 2rem 0;
}

.dupa-main__empty {
  text-align: center;
  color: var(--color-text);
}

/* ========== Breadcrumbs ========== */
.dupa-breadcrumbs {
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.dupa-breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.dupa-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dupa-breadcrumbs__link {
  color: var(--color-primary);
  text-decoration: none;
}

.dupa-breadcrumbs__link:hover {
  text-decoration: underline;
}

.dupa-breadcrumbs__current {
  color: var(--color-text);
}

.dupa-breadcrumbs__sep {
  color: #999;
}

/* ========== Footer ========== */
.dupa-footer {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 2rem 0 1.5rem;
  margin-top: auto;
}

.dupa-footer__inner {
  text-align: center;
}

.dupa-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.dupa-footer__logo {
  display: block;
  flex-shrink: 0;
}

.dupa-footer__logo-img {
  display: block;
  max-height: 60px;
  width: auto;
}

.dupa-footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
}

.dupa-footer__contact-item {
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.9375rem;
}

.dupa-footer__contact-item:hover {
  color: var(--color-accent);
}

.dupa-footer__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dupa-footer__social-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
}

.dupa-footer__social-link:hover {
  color: var(--color-accent);
}

.dupa-footer__copy {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

/* ========== Scroll to top ========== */
.dupa-scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.dupa-scroll-top:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.dupa-scroll-top[hidden] {
  display: none;
}

.dupa-scroll-top__icon {
  display: block;
}
