/* CatÃ¡logo de la tienda (products/index.html) */
.pk-shop-container {
  --shop-surface: #191521;
  --shop-surface2: #231b2b;
  --shop-line: #3b2940;
  --shop-radius: 18px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 42px);
}

/* Buscador en la barra superior */
.pk-header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 590px;
  margin: 0 auto;
  padding: 0 18px;
  border: 1px solid #594360;
  border-radius: 50px;
  background: var(--shop-surface2, #231b2b);
  color: #a89bac;
  cursor: text;
}

.pk-header-search:focus-within {
  border-color: var(--pk-primary);
  box-shadow: 0 0 0 3px rgba(255, 50, 150, 0.2);
}

.pk-header-search input {
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--pk-text);
}

.pk-header-search input::placeholder {
  color: #a89bac;
}

/* Estructura */
.pk-shop {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 25px;
  padding: 22px 0 10px;
}

.pk-sidebar {
  align-self: start;
  position: sticky;
  top: 110px;
}

.pk-sidebar-inner {
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  background: linear-gradient(160deg, #1c1726, #15121c);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 50, 150, 0.45) transparent;
}

.pk-side-heading {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--pk-text);
}

.pk-side-title {
  margin: 4px 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: var(--pk-text, #fff);
}

.pk-categories {
  display: grid;
  gap: 4px;
}

.pk-category,
.pk-subcategory {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pk-text);
  text-align: left;
  transition: background 0.2s;
}

.pk-category:hover,
.pk-subcategory:hover {
  background: #492039;
}

.pk-category.active {
  background: linear-gradient(90deg, #d91b79, #5c1744);
}

.pk-category-main {
  min-height: 52px;
  padding: 14px 14px;
  border: 1px solid rgba(255, 50, 150, 0.7);
  background: linear-gradient(90deg, rgba(255, 50, 150, 0.34), rgba(92, 23, 68, 0.55));
  font-size: 16px;
  font-weight: 800;
}

.pk-category-main:hover,
.pk-category-main.active {
  background: linear-gradient(90deg, #ff3296, #d91b79);
  box-shadow: 0 0 18px rgba(255, 50, 150, 0.35);
  color: #fff;
}

.pk-category-quiet {
  color: var(--pk-text-muted);
  font-weight: 500;
}

.pk-category-quiet:hover {
  color: var(--pk-text);
}

.pk-category-featured {
  border: 1px solid rgba(255, 120, 45, 0.55);
  background: linear-gradient(90deg, rgba(255, 92, 44, 0.2), rgba(217, 27, 121, 0.2));
}

.pk-category-featured:hover,
.pk-category-featured.active {
  background: linear-gradient(90deg, #ef5b2a, #d91b79);
  box-shadow: 0 0 18px rgba(239, 91, 42, 0.28);
}

.pk-category-sale {
  border: 1px solid rgba(255, 202, 58, 0.45);
  background: rgba(255, 202, 58, 0.08);
}

.pk-category-sale:hover,
.pk-category-sale.active {
  background: linear-gradient(90deg, #9b5b10, #d91b79);
}

.pk-subcategories {
  display: grid;
  gap: 2px;
  margin: 2px 0 6px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--shop-line);
}

.pk-subcategory {
  padding: 8px 10px;
  font-size: 14px;
  color: var(--pk-text-muted);
}

.pk-subcategory.active {
  background: rgba(255, 50, 150, 0.18);
  color: #fff;
}

a.pk-category,
a.pk-subcategory {
  text-decoration: none;
}

a.pk-category:hover {
  color: var(--pk-text);
}

a.pk-subcategory:hover {
  color: var(--pk-text-muted);
}

a.pk-subcategory.active,
a.pk-subcategory.active:hover {
  color: #fff;
}

.pk-card h3 a {
  color: inherit;
  text-decoration: none;
}

.pk-card .pk-photo {
  cursor: pointer;
}

.pk-card h3 a:hover {
  color: #ff9bcb;
}

/* Página pública de producto */
.pk-breadcrumb .breadcrumb-item,
.pk-breadcrumb .breadcrumb-item::before {
  color: var(--pk-text-muted);
}

.pk-breadcrumb a {
  color: #ff9bcb;
  text-decoration: none;
}

.pk-product-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--pk-text);
}

.pk-product-brand {
  color: var(--pk-text-muted);
}

.pk-count {
  flex: none;
  font-size: 12px;
  color: #ded0e3;
}

.pk-divider {
  height: 1px;
  margin: 23px 0;
  background: var(--shop-line);
}

.pk-range {
  width: 100%;
  accent-color: var(--pk-primary);
}

.pk-price-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--pk-text-muted);
}

/* Botones */
.pk-btn {
  border: 1px solid var(--shop-line);
  border-radius: 11px;
  padding: 10px 14px;
  background: transparent;
  color: var(--pk-text);
  font-weight: 700;
}

.pk-btn:hover {
  color: #fff;
  filter: brightness(1.13);
}

.pk-btn-primary {
  border-color: var(--pk-primary);
  background: var(--pk-primary);
  color: #fff;
}

.pk-btn-primary:hover {
  background: var(--pk-primary-hover);
  border-color: var(--pk-primary-hover);
}

.pk-btn-primary:disabled {
  border-color: #6b2b4c;
  background: #3a2033;
  color: #ffb3d6;
  opacity: 1;
}

.pk-btn-secondary {
  border-color: #55425b;
}

.pk-btn-outline {
  border-color: var(--pk-primary);
  color: var(--pk-primary);
}

.pk-btn:focus-visible,
.pk-category:focus-visible,
.pk-subcategory:focus-visible,
.pk-favorite:focus-visible,
.pk-select:focus-visible {
  outline: 2px solid #ff9bcb;
  outline-offset: 3px;
  box-shadow: none;
}

/* Encabezado del listado */
.pk-content {
  min-width: 0;
}

@media (min-width: 992px) {
  .pk-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 18px;
    align-items: end;
  }

  .pk-heading,
  .pk-tools {
    margin-bottom: 23px;
  }

  .pk-tools {
    justify-self: end;
  }

  .pk-content > :not(.pk-heading):not(.pk-tools) {
    grid-column: 1 / -1;
  }
}

.pk-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
}

.pk-heading h1 {
  margin: 0 0 5px;
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 800;
  color: var(--pk-text);
}

.pk-heading p {
  margin: 0;
  color: var(--pk-text-muted);
}

.pk-line-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.pk-line-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: transparent;
  color: #c9b8c2;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.pk-line-btn.active,
.pk-line-btn:hover,
.pk-line-btn:focus-visible {
  background: var(--pk-primary);
  color: #fff;
  outline: none;
}

.pk-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pk-select {
  padding: 10px 11px;
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  background: var(--shop-surface2);
  color: var(--pk-text);
}

/* Tarjetas. El ID iguala la especificidad de las reglas flex de styles.css y pecado-kinki.css. */
#product-container.pk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

#product-container.pk-grid > .pk-card {
  flex: initial;
  width: auto;
  max-width: none;
}

.pk-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  background: linear-gradient(155deg, #211929, #17131f);
  transition: transform 0.2s, border-color 0.2s;
}

.pk-card:hover {
  border-color: #98406f;
  transform: translateY(-2px);
}

.pk-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.pk-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.pk-discount-banner {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  padding: 8px 48px 8px 12px;
  background: linear-gradient(90deg, #ff2f86, #ff5a22);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
}

.pk-photo img.is-fallback {
  object-fit: contain;
  padding: 18%;
  box-sizing: border-box;
  opacity: 0.6;
}

.pk-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  overflow: hidden;
  padding: 5px 10px;
  border-radius: 30px;
  background: var(--pk-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pk-tag-top {
  background: linear-gradient(90deg, #f15a24, #d91b79);
}

.pk-tag-off {
  background: #f4c542;
  color: #211929;
}

.pk-favorite {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #211929;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.pk-favorite.active {
  color: var(--pk-primary);
}

.pk-card-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 3px 8px;
}

.pk-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--pk-text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pk-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.pk-price {
  margin: 2px 0 4px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--pk-primary);
}

.pk-wholesale-hint {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pk-text-muted, #9aa0a6);
  line-height: 1.3;
}

.pk-price-original {
  color: var(--pk-text-muted);
  font-size: 14px;
  text-decoration: line-through;
}

.pk-saving {
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255, 47, 134, 0.16);
  color: #ff8ec4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pk-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 30px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.pk-detail-badge-top {
  background: linear-gradient(90deg, #f15a24, #d91b79);
}

.pk-detail-badge-off {
  background: #f4c542;
  color: #211929;
}

.pk-detail-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.thumbnail-btn {
  object-fit: contain;
  background: #fff;
}

.pk-no-price {
  margin: auto 0 0;
  font-size: 13px;
  color: var(--pk-text-muted);
}

.pk-card-buttons {
  display: grid;
  gap: 7px;
}

.pk-card-buttons .pk-btn {
  width: 100%;
  padding: 10px 8px;
  font-size: 13px;
}

.pk-footer-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  font-size: 13px;
  color: var(--pk-text-muted);
}

.pk-empty {
  padding: 55px 10px;
  text-align: center;
  color: var(--pk-text-muted);
}

.sexshop-discovery {
  margin: 0 0 18px;
}

.sexshop-discovery__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--pk-primary, #ff3296);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease;
}

.sexshop-discovery__link:hover,
.sexshop-discovery__link:focus {
  background: var(--pk-primary-hover, #f72585);
  color: #fff;
}

.sexshop-discovery__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sexshop-discovery__label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pk-range {
  touch-action: pan-x;
}

@media (min-width: 768px) {
  .sexshop-discovery__link {
    width: fit-content;
    min-width: 230px;
  }
}

@media (max-width: 1350px) {
  #product-container.pk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Barra lateral como panel deslizable (Bootstrap offcanvas-lg) */
@media (max-width: 991.98px) {
  .pk-shop {
    grid-template-columns: 1fr;
  }

  .pk-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: min(330px, 88vw) !important;
    background: #15121c !important;
    border-right: 1px solid var(--shop-line) !important;
  }

  .pk-sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-radius: 0;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .pk-sidebar-head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -22px -22px 12px;
    padding: 22px 22px 12px;
    background: #15121c;
  }

  #catalogSidebar .pk-category,
  #catalogSidebar .pk-subcategory {
    min-height: 44px;
  }

  #catalogSidebar a.pk-category:not(.active):not(.pk-category-main) {
    background: rgba(255, 255, 255, 0.05);
  }

  .pk-tools {
    position: sticky;
    top: var(--pk-nav-offset, 72px);
    z-index: 1020;
    width: 100%;
    margin: 0 0 12px;
    padding: 8px 0;
    background: #110e16;
  }

  .pk-tools.is-pinned {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1020;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 8px clamp(12px, 3vw, 42px);
    background: #110e16;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
  }

  .pk-tools-spacer {
    display: block;
    height: 0;
  }
}

@media (max-width: 700px) {
  .modern-navbar .navbar-content-wrapper {
    flex-wrap: wrap;
  }

  .pk-header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .pk-shop {
    padding-top: 16px;
  }

  .pk-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .pk-heading p {
    font-size: 13px;
  }

  .pk-tools {
    width: 100%;
  }

  .pk-select {
    flex: 1;
    min-width: 0;
  }

  #product-container.pk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pk-card {
    padding: 7px;
    border-radius: 13px;
  }

  .pk-card-info {
    padding: 9px 2px 4px;
  }

  .pk-card h3 {
    min-height: 36px;
    font-size: 13px;
  }

  .pk-price {
    font-size: 17px;
  }

  .pk-card-buttons .pk-btn {
    padding: 10px 4px;
    font-size: 11px;
  }

  .pk-tag {
    bottom: 6px;
    left: 6px;
    font-size: 10px;
  }

  .pk-favorite {
    width: 30px;
    height: 30px;
  }

  .pk-footer-line {
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  #product-container.pk-grid {
    grid-template-columns: 1fr;
  }

  .pk-card h3 {
    font-size: 16px;
  }

  .pk-card-buttons .pk-btn {
    font-size: 13px;
  }
}
