/* ERATOOLS V5.5 - Mega UX / Customer / Product / Admin / SEO
   Obowiązkowa warstwa wyglądu do paczki V5.5.
*/

/* Header account dropdown */
.header-account-menu {
  position: relative;
  display: flex;
  align-items: stretch;
}

.header-account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 50%;
  transform: translateX(50%) translateY(8px);
  width: 248px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line, rgba(255,255,255,.10));
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255,196,0,.16), transparent 36%),
    var(--card, #11171b);
  box-shadow: 0 24px 58px rgba(0,0,0,.38);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 90;
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.header-account-menu:hover .header-account-dropdown,
.header-account-menu:focus-within .header-account-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(50%) translateY(0);
}

.header-account-dropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(50%) rotate(45deg);
  background: var(--card, #11171b);
  border-left: 1px solid var(--line, rgba(255,255,255,.10));
  border-top: 1px solid var(--line, rgba(255,255,255,.10));
}

.header-account-dropdown strong {
  display: block;
  padding: 7px 9px 10px;
  color: var(--accent, #ffc400);
  font-size: .9rem;
  line-height: 1.15;
}

.header-account-dropdown a {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 11px;
  padding: 8px 10px;
  color: var(--text, #f7f9fb);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 760;
}

.header-account-dropdown a:hover {
  color: #111;
  background: var(--accent, #ffc400);
}

.header-account-dropdown a.is-danger:hover {
  color: #fff;
  background: #d93b31;
}

/* Global front polish */
.site-header .search__form {
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.site-header .search__form:focus-within {
  border-color: rgba(255,196,0,.62);
  box-shadow: 0 0 0 4px rgba(255,196,0,.10);
}

.header-action {
  border-radius: 14px;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.header-action:hover {
  transform: translateY(-1px);
}

.product-card,
.home-product-card,
.category-product-card,
.product-tile,
.product-list-card,
.home-section-product {
  border-radius: 20px !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.product-card:hover,
.home-product-card:hover,
.category-product-card:hover,
.product-tile:hover,
.product-list-card:hover,
.home-section-product:hover {
  transform: translateY(-3px);
  border-color: rgba(255,196,0,.30) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.22) !important;
}

.product-card img,
.home-product-card img,
.category-product-card img,
.product-tile img {
  transition: transform .22s ease;
}

.product-card:hover img,
.home-product-card:hover img,
.category-product-card:hover img,
.product-tile:hover img {
  transform: scale(1.035);
}

/* Product PRO layer */
.product-page,
.product-v4,
.product-detail,
.product-view {
  font-family: var(--font-main, "Inter", "Segoe UI", Roboto, Arial, sans-serif);
}

.product-hero,
.product-main,
.product-summary,
.product-gallery,
.product-info-panel {
  border-radius: 22px;
}

.product-variants,
.product-actions,
.product-meta,
.product-tabs,
.product-related,
.product-benefits {
  border-radius: 18px;
}

.product-variant,
.variant-option,
.product-option {
  border-radius: 13px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.product-variant:hover,
.variant-option:hover,
.product-option:hover {
  border-color: rgba(255,196,0,.50) !important;
  transform: translateY(-1px);
}

/* Category/listing PRO layer */
.category-layout,
.category-shell,
.category-products,
.listing-products {
  font-family: var(--font-main, "Inter", "Segoe UI", Roboto, Arial, sans-serif);
}

.category-toolbar,
.category-filter-panel,
.category-sidebar,
.category-description,
.category-faq,
.listing-toolbar {
  border-radius: 20px;
}

.category-toolbar select,
.category-toolbar input,
.listing-toolbar select,
.listing-toolbar input {
  min-height: 42px;
  border-radius: 12px;
}

.category-mobile-filter-toggle,
.filter-mobile-toggle {
  min-height: 42px;
  border-radius: 12px;
  background: var(--accent, #ffc400);
  color: #111;
  font-weight: 900;
}

/* Customer premium additions */
.customer-card,
.customer-sidebar,
.customer-product-card,
.customer-v52-card,
.customer-order-row,
.customer-list-row,
.customer-ticket-card {
  backdrop-filter: blur(8px);
}

.customer-card.is-hero {
  border-color: color-mix(in srgb, var(--line) 72%, var(--accent));
}

.customer-dashboard-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.customer-dashboard-quick a {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
}

.customer-dashboard-quick a:hover {
  border-color: rgba(255,196,0,.34);
  color: var(--accent);
}

/* Admin V5.5 */
.v55-admin-page {
  font-family: var(--font-main, "Inter", "Segoe UI", Roboto, Arial, sans-serif);
}

.v55-admin-head {
  gap: 16px;
}

.v55-admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.v55-card {
  overflow: hidden;
}

.v55-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.v55-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.v55-stat-grid article {
  border: 1px solid #dfe7d5;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.v55-stat-grid article.is-warning {
  background: #fff7dc;
  border-color: #f4d36e;
}

.v55-stat-grid article.is-ok {
  background: #effaf1;
  border-color: #bde9c4;
}

.v55-stat-grid span {
  display: block;
  color: #64705f;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.v55-stat-grid strong {
  display: block;
  margin-top: 7px;
  color: #172116;
  font-size: 1.65rem;
  line-height: 1;
}

.v55-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.v55-form label {
  display: grid;
  gap: 8px;
  color: #172116;
  font-size: .88rem;
  font-weight: 850;
}

.v55-form input,
.v55-form select,
.v55-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7e0cd;
  border-radius: 13px;
  background: #fff;
  padding: 0 13px;
  color: #172116;
  font: inherit;
}

.v55-form textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
}

.v55-form .is-wide {
  grid-column: 1 / -1;
}

.v55-data-list {
  display: grid;
  gap: 10px;
}

.v55-data-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #e4eadf;
  border-radius: 14px;
  background: #f7f9f3;
  padding: 12px;
}

.v55-data-list span {
  display: block;
  color: #64705f;
  word-break: break-word;
}

.v55-data-list strong {
  color: #172116;
}

.v55-muted {
  color: #64705f;
}

/* Mobile */
@media (max-width: 1180px) {
  .v55-grid,
  .v55-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v55-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-dashboard-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-account-dropdown {
    right: 0;
    transform: translateY(8px);
  }

  .header-account-menu:hover .header-account-dropdown,
  .header-account-menu:focus-within .header-account-dropdown {
    transform: translateY(0);
  }

  .header-account-dropdown::before {
    right: 28px;
    transform: rotate(45deg);
  }

  .v55-grid,
  .v55-stat-grid,
  .v55-form,
  .customer-dashboard-quick {
    grid-template-columns: 1fr;
  }

  .v55-admin-actions {
    justify-content: flex-start;
  }
}
