/* ============================================================
   ARCHIWUM SKLEPU (custom template — page-sklep.php)
   ============================================================ */
.shop-page-wrap {
  padding: 8rem 4rem 4rem;
  background: var(--black);
  min-height: 100vh;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.shop-grid .product-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card-stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.shop-grid .product-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-price {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-top: 0.75rem;
}

.product-card-actions {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
}
.product-card-actions .button,
.product-card-actions .add_to_cart_button {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--black) !important;
  background: var(--gradient);
  border: 1px solid transparent;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.2s, opacity 0.3s;
}
.product-card-actions .button:hover,
.product-card-actions .add_to_cart_button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.product-card-actions .added_to_cart {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--gold);
  text-decoration: underline;
}

/* ── FILTRY KATEGORII ── */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.shop-filter-btn {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.65rem 1.4rem;
  border-radius: 30px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.shop-filter-btn:hover {
  color: var(--text);
  border-color: rgba(168,85,247,0.4);
}
.shop-filter-btn.is-active {
  color: var(--black);
  background: var(--gradient);
  border-color: transparent;
}
.product-card.is-hidden { display: none; }

@media (max-width: 1100px) {
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .shop-page-wrap { padding: 6.5rem 1.5rem 3rem; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   POJEDYNCZY PRODUKT (custom template — single-product.php)
   ============================================================ */
.product-page-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8.5rem 2rem 6rem;
}
.product-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}
.product-back-link:hover { color: var(--gold); }

.product-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: start;
}

.product-cover,
.product-cover-placeholder {
  max-width: 320px;
  aspect-ratio: 3/4;
  border-radius: 20px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover-placeholder {
  border: 2px dashed var(--border);
  background: var(--black3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--text-muted);
}
.product-cover-placeholder span { font-size: 0.8rem; font-weight: 600; }

.product-badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  background: var(--black2);
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.product-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.6rem, 1.6vw + 1.1rem, 2.1rem);
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}
.product-author { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 0.25rem; }
.product-price { font-family: var(--serif); font-weight: 800; font-size: 1.6rem; color: var(--gold-light); margin: 0 0 2rem; }

.product-description {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.product-description p { margin: 0; }
.product-description p:first-child { color: var(--text); font-weight: 600; font-size: 1rem; }

.product-related { margin-top: 2.5rem; }
.product-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.product-related-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}
.product-related-item img { border-radius: 10px; border: 1px solid var(--border); aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.product-related-item:hover { color: var(--gold-light); }

.product-order-panel {
  position: sticky;
  top: 6.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--black3);
  padding: 2rem;
}
.product-order-panel h2 { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; margin: 0 0 1.25rem; }
.product-order-line { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.product-order-line-price { color: var(--text); font-weight: 600; }
.product-order-divider { height: 1px; background: var(--border); margin: 1rem 0; }
.product-order-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.75rem; }
.product-order-total span:first-child { font-weight: 700; font-size: 0.92rem; }
.product-order-total-amount { font-family: var(--serif); font-weight: 800; font-size: 1.5rem; color: var(--gold-light); }
.product-buy-btn { display: block; width: 100%; margin-bottom: 1rem; }
.product-order-terms { font-size: 0.78rem; line-height: 1.6; color: var(--text-muted); text-align: center; margin: 0 0 1rem; }
.product-order-terms a { color: var(--text-muted); text-decoration: underline; }
.product-order-terms a:hover { color: var(--gold-light); }
.product-order-secure { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .product-page-wrap { padding: 7rem 1.5rem 4rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-order-panel { position: static; }
}

/* ============================================================
   KOSZYK / CHECKOUT / MOJE KONTO (domyślne szablony WooCommerce)
   ============================================================ */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 9rem 2rem 5rem;
}

.woocommerce table.shop_table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.woocommerce table.shop_table th {
  background: var(--black3);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.woocommerce table.shop_table td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
}
.woocommerce table.shop_table td.product-name a { color: var(--text); text-decoration: none; }
.woocommerce table.shop_table td.product-name a:hover { color: var(--gold); }
.woocommerce table.shop_table .product-thumbnail img {
  width: 64px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.woocommerce table.shop_table .amount { color: var(--gold); }
.woocommerce table.shop_table tr:last-child td { border-bottom: none; }

.woocommerce .cart-collaterals .cart_totals {
  background: var(--black3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.woocommerce .cart-collaterals .cart_totals h2 {
  font-family: var(--serif);
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-top: 0;
}
.woocommerce .cart-collaterals .cart_totals table { border: none; }
.woocommerce .cart-collaterals .cart_totals table td,
.woocommerce .cart-collaterals .cart_totals table th { background: transparent; padding: 0.75rem 0; }

.woocommerce-checkout #payment {
  background: var(--black3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.woocommerce-checkout #payment ul.payment_methods { border: none; padding: 0; }
.woocommerce-checkout #payment div.payment_box {
  background: var(--black2);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  border-radius: 8px;
}
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--black2); }

.woocommerce form .form-row label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select {
  background: var(--black3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  width: 100%;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce-checkout select:focus {
  outline: none;
  border-color: var(--gold);
}
.woocommerce-checkout .woocommerce-additional-fields,
.woocommerce-checkout #order_review {
  background: var(--black3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

/* ============================================================
   WC BLOCKS — KOSZYK I CHECKOUT
   (wariant faktycznie renderowany na tej instalacji WooCommerce:
   strony Koszyk/Zamówienie używają bloków Cart/Checkout, nie
   klasycznych shortcode'ów — stąd selektory .wc-block-*, osobne
   od sekcji "domyślne szablony WooCommerce" powyżej. Layout/grid
   zostawiamy WC Blocks, nadpisujemy tylko kolory/typografię.)
   ============================================================ */
.wc-block-cart,
.wc-block-checkout {
  color: var(--text);
  font-family: var(--sans);
}

.wc-block-components-checkout-step__title,
.wc-block-cart__totals-title,
.wc-block-components-checkout-order-summary__title-text,
.wc-block-components-title {
  font-family: var(--serif) !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text) !important;
}

.wc-block-components-checkout-step__heading-content,
.wc-block-components-checkout-step__description {
  color: var(--text-muted);
}

.wc-block-components-checkout-step {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Sidebar / order summary card */
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
  background: var(--black3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.wc-block-components-totals-wrapper {
  border-color: var(--border) !important;
}
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__description {
  color: var(--text-muted);
}
.wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-formatted-money-amount,
.wc-block-components-formatted-money-amount,
.wc-block-components-product-price__value {
  color: var(--gold);
  font-family: var(--serif);
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-family: var(--serif);
  color: var(--text);
  font-size: 1.05rem;
}

/* Cart / order summary line items */
.wc-block-cart-items__header {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.wc-block-cart-items__row,
.wc-block-components-order-summary-item {
  border-bottom: 1px solid var(--border);
}
.wc-block-components-product-name {
  color: var(--text) !important;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}
.wc-block-components-product-name:hover { color: var(--gold) !important; }
.wc-block-components-product-metadata__description {
  color: var(--text-muted);
}
.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Quantity stepper */
.wc-block-components-quantity-selector {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--black3);
}
.wc-block-components-quantity-selector__button {
  color: var(--text-muted);
  background: transparent;
}
.wc-block-components-quantity-selector__button:hover { color: var(--gold); }
.wc-block-components-quantity-selector__input {
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
}
.wc-block-cart-item__remove-link {
  color: var(--text-muted) !important;
  font-size: 0.75rem;
}
.wc-block-cart-item__remove-link:hover { color: var(--gold) !important; }

/* Text inputs, selects, checkboxes (checkout form) */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-blocks-components-select__select,
.wc-block-components-country-input input {
  background: var(--black3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-family: var(--sans);
  border-radius: 6px !important;
}
.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus {
  border-color: var(--gold) !important;
  box-shadow: none !important;
}
.wc-block-components-text-input label,
.wc-blocks-components-select__label {
  color: var(--text-muted) !important;
}
.wc-block-components-text-input svg,
.wc-blocks-components-select svg {
  fill: var(--text-muted);
}
.wc-block-components-checkbox__mark { fill: var(--black); }
.wc-block-components-checkbox__input:checked + .wc-block-components-checkbox__mark {
  background: var(--gradient);
}
.wc-block-components-checkbox__label { color: var(--text-muted); }

/* Address card (saved billing address summary) */
.wc-block-components-address-card {
  background: var(--black3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
}
.wc-block-components-address-card__edit { color: var(--gold) !important; }

/* Buttons */
.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  font-family: var(--sans) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--black) !important;
  background: var(--gradient) !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: transform 0.2s, opacity 0.3s;
}
.wc-block-components-button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.wc-block-components-button.wp-element-button.is-link,
.wc-block-components-totals-coupon__button {
  background: transparent !important;
  color: var(--gold) !important;
}

/* Coupon / panel toggle */
.wc-block-components-panel__button {
  color: var(--text-muted);
}
.wc-block-components-panel__button:hover { color: var(--gold); }
.wc-block-components-totals-coupon__content .wc-block-components-text-input {
  margin-bottom: 0.75rem;
}

/* Notices (np. "brak dostępnych metod płatności") */
.wc-block-components-notice-banner {
  background: var(--black3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  color: var(--text);
  border-radius: 8px;
}
.wc-block-components-notice-banner.is-error { border-left-color: #f87171; }
.wc-block-components-notice-banner.is-success { border-left-color: #4ade80; }

/* Linki w tekście regulaminu muszą zostać widoczne/klikalne */
.wc-block-checkout__terms,
.wc-block-checkout__terms a {
  color: var(--text-muted);
}
.wc-block-checkout__terms a {
  color: var(--gold);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .wc-block-components-sidebar .wc-block-components-panel,
  .wc-block-cart__sidebar,
  .wc-block-checkout__sidebar {
    padding: 1.25rem;
  }
}
