/* ==========================================================================
   KAMCZEPKA — WooCommerce Additional Styles
   ========================================================================== */

/* Grid override for WooCommerce products list */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* Ordering & Results */
.woocommerce .woocommerce-result-count {
  font-size: 0.85rem;
  color: #6b7280;
}

.woocommerce .woocommerce-ordering select {
  padding: 8px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #374151;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.woocommerce .woocommerce-ordering select:focus {
  border-color: #e8b730;
  outline: none;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
  margin-top: 2rem;
}

.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  border: none !important;
}

.woocommerce nav.woocommerce-pagination ul li {
  border: none !important;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid #e5e7eb !important;
  transition: all 0.15s ease;
  background: #fff !important;
  color: #374151 !important;
  min-width: 40px;
  text-align: center;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
  border-color: #e8b730 !important;
  color: #e8b730 !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #e8b730 !important;
  border-color: #e8b730 !important;
  color: #1a1a1a !important;
}

/* Star Rating */
.woocommerce .star-rating {
  color: #e8b730;
}

/* Quantity Input — see style.css for cart-specific qty rules */

/* Cart table — see style.css for full cart page styles */

/* Checkout */
.woocommerce-checkout .woocommerce {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: #e8b730;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 183, 48, 0.1);
}

.woocommerce form .form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

/* Messages */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  border-radius: 8px;
  padding: 1rem 1.5rem;
}

/* My Account */
.woocommerce-account .woocommerce-MyAccount-navigation {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #374151;
  transition: all 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background: #fdf3d0;
  color: #e8b730;
  font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #e5e7eb;
}

/* My Account SPA — Addresses stack */
.spa-addresses-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.spa-address-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.spa-address-card .woocommerce-Address-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.spa-address-card .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fdf3d0;
  color: #a66b00;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.spa-address-card .badge-neutral {
  background: #eef2ff;
  color: #4338ca;
}

.spa-address-card address {
  line-height: 1.5;
  color: #374151;
  margin-bottom: 0.75rem;
}

.spa-address-card .spa-edit-form {
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  padding: 1rem;
  border-radius: 10px;
}

.spa-address-card .form-actions {
  display: flex;
  gap: 10px;
  margin-top: 0.5rem;
}

.spa-address-card .nip-row .nip-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.spa-address-card .nip-row input {
  flex: 1;
}

.spa-address-card .nip-button {
  white-space: nowrap;
  min-height: 38px;
}

/* Widgets */
.widget {
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e8b730;
}

.widget ul li {
  margin-bottom: 0.5rem;
}

.widget ul li a {
  font-size: 0.85rem;
  color: #4b5563;
  transition: color 0.15s ease;
}

.widget ul li a:hover {
  color: #e8b730;
}

.widget .count {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Price Filter */
.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content {
  background: #e5e7eb;
  border-radius: 4px;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-range {
  background: #e8b730;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle {
  background: #e8b730;
  border-color: #d4a520;
}

/* Responsive */
@media (max-width: 992px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-layout {
    grid-template-columns: 1fr !important;
  }

  .shop-sidebar {
    order: -1;
  }

  .product-detail {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Cart mobile — see style.css for full responsive cart styles */

  /* Checkout */
  .woocommerce-checkout .woocommerce {
    padding: 1rem;
    border-radius: 8px;
  }

  .woocommerce form .form-row {
    width: 100% !important;
    float: none !important;
    padding: 0 0 0.75rem 0 !important;
  }

  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    width: 100% !important;
  }

  .woocommerce form .form-row input.input-text,
  .woocommerce form .form-row textarea,
  .woocommerce form .form-row select {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .woocommerce #payment #place_order,
  .woocommerce .woocommerce-Button {
    width: 100%;
    min-height: 48px;
    font-size: 0.9rem;
  }

  /* My Account */
  .woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 1rem;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    padding: 8px 12px;
    font-size: 0.8rem;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .woocommerce-account .woocommerce-MyAccount-content {
    padding: 1rem;
  }

  /* Ordering & Filtering */
  .woocommerce .woocommerce-ordering {
    width: 100%;
    margin-bottom: 1rem;
  }

  .woocommerce .woocommerce-ordering select {
    width: 100%;
    min-height: 44px;
  }

  .woocommerce .woocommerce-result-count {
    width: 100%;
    text-align: center;
    margin-bottom: 0.75rem;
  }

  /* Notices */
  .woocommerce .woocommerce-message,
  .woocommerce .woocommerce-info,
  .woocommerce .woocommerce-error {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  /* Widgets */
  .widget-title {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }

  /* Pagination compact */
  .woocommerce nav.woocommerce-pagination ul li a,
  .woocommerce nav.woocommerce-pagination ul li span {
    padding: 6px 10px !important;
    font-size: 0.8rem;
    min-width: 34px;
  }

  /* Quantity */
  .woocommerce .quantity .qty {
    width: 60px;
    padding: 8px;
    min-height: 44px;
  }
}
