/* site.css — дополнения к homepage.css для каталога, карточки, корзины */

.ulh-main { padding: 24px 0 40px; }

.ulh-breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:12px; color:var(--ulh-muted); margin-bottom:16px; }
.ulh-breadcrumbs a { color:var(--ulh-muted); text-decoration:none; }
.ulh-breadcrumbs a:hover { color:var(--ulh-green); }
.ulh-breadcrumbs span { color:var(--ulh-ink); }

.ulh-page-title { font-size:28px; font-weight:800; letter-spacing:-.6px; margin:0 0 6px; }
.ulh-page-sub { color:var(--ulh-muted); font-size:13px; margin:0 0 20px; }

/* карточка товара в сетке */
.ulh-product-card { background:#fff; border:1px solid #e2eaee; border-radius:14px; overflow:hidden; display:flex; flex-direction:column; transition:border-color .2s, box-shadow .2s; }
.ulh-product-card:hover { border-color:#bfdccd; box-shadow:0 10px 22px rgba(22,51,66,.06); }
.ulh-product-visual { display:flex; align-items:center; justify-content:center; height:150px; background:linear-gradient(180deg,#fff,#f4f8f9); border-bottom:1px solid #eef3f5; }
.ulh-product-visual img { max-width:100%; max-height:100%; object-fit:contain; }
.ulh-product-content { padding:10px 12px 12px; display:flex; flex-direction:column; gap:8px; flex:1; }
.ulh-product-title { font-size:12.5px; font-weight:700; line-height:1.45; color:var(--ulh-ink); text-decoration:none; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:36px; }
.ulh-product-title:hover { color:var(--ulh-green); }
.ulh-product-bottom { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ulh-product-price { font-size:16px; font-weight:800; color:var(--ulh-ink); white-space:nowrap; }
.ulh-product-cart { display:inline-flex; align-items:center; justify-content:center; height:32px; padding:0 12px; border-radius:8px; background:linear-gradient(135deg,#079451,#007442); color:#fff; font-size:11px; font-weight:800; text-decoration:none; }
.ulh-product-cart:hover { filter:brightness(1.07); }

/* категории */
.ulh-category-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.ulh-category-card { display:flex; flex-direction:column; gap:6px; padding:12px; background:#fff; border:1px solid #e2eaee; border-radius:12px; text-decoration:none; color:var(--ulh-ink); }
.ulh-category-card:hover { border-color:#bfdccd; }
.ulh-category-card b { font-size:12.5px; font-weight:700; }
.ulh-category-count { font-size:11px; color:var(--ulh-muted); }

/* карточка товара (страница) */
.pp-grid { display:grid; grid-template-columns:minmax(0,1fr) 420px; gap:24px; align-items:start; }
.pp-gallery { display:grid; grid-template-columns:84px minmax(0,1fr); gap:12px; }
.pp-thumbs { display:flex; flex-direction:column; gap:8px; max-height:420px; overflow-y:auto; }
.pp-thumb { width:76px; height:76px; border:1px solid #e2eaee; border-radius:9px; background:#fff; padding:4px; cursor:pointer; }
.pp-thumb img { width:100%; height:100%; object-fit:contain; }
.pp-thumb.is-active { border-color:var(--ulh-green); }
.pp-main { border:1px solid #e2eaee; border-radius:14px; background:#f7fafb; display:flex; align-items:center; justify-content:center; min-height:420px; }
.pp-main img { max-width:100%; max-height:520px; object-fit:contain; }
.pp-info h1 { font-size:24px; font-weight:800; line-height:1.25; margin:0 0 8px; }
.pp-meta { color:var(--ulh-muted); font-size:12px; margin-bottom:12px; }
.pp-price { font-size:30px; font-weight:800; margin:12px 0 16px; }
.pp-buy { display:inline-flex; align-items:center; justify-content:center; height:46px; padding:0 26px; border-radius:10px; background:linear-gradient(135deg,#079451,#007442); color:#fff; font-weight:800; text-decoration:none; }
.pp-desc { margin-top:24px; background:#fff; border:1px solid #e2eaee; border-radius:14px; padding:18px; font-size:14px; line-height:1.6; }
.pp-desc img { max-width:100%; height:auto; }

/* корзина */
.cart-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:20px; align-items:start; }
.cart-item { display:grid; grid-template-columns:84px minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px; background:#fff; border:1px solid #e2eaee; border-radius:12px; margin-bottom:10px; }
.cart-item img { width:84px; height:84px; object-fit:contain; }
.cart-item a { color:var(--ulh-ink); text-decoration:none; font-weight:700; font-size:13px; }
.cart-qty { display:flex; align-items:center; gap:6px; margin-top:6px; }
.cart-qty a { width:26px; height:26px; border:1px solid #dbe4ea; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; color:#3f5561; }
.cart-sum { background:#fff; border:1px solid #e2eaee; border-radius:14px; padding:18px; position:sticky; top:14px; }
.cart-sum__row { display:flex; justify-content:space-between; font-size:13px; color:var(--ulh-muted); padding:5px 0; }
.cart-sum__total { display:flex; justify-content:space-between; font-size:18px; font-weight:800; margin:10px 0 14px; }
.cart-sum__btn { display:flex; align-items:center; justify-content:center; height:44px; border-radius:9px; background:linear-gradient(135deg,#079451,#007442); color:#fff; font-weight:800; text-decoration:none; }

/* формы */
.form-row { margin-bottom:12px; }
.form-row label { display:block; font-size:12px; font-weight:700; color:#51636f; margin-bottom:5px; }
.form-row input, .form-row textarea, .form-row select { width:100%; height:42px; border:1px solid #d6e1e8; border-radius:9px; padding:0 12px; font:inherit; font-size:14px; background:#fbfdfe; box-sizing:border-box; }
.form-row textarea { height:90px; padding:10px 12px; resize:vertical; }
.form-btn { height:46px; padding:0 24px; border:0; border-radius:9px; background:linear-gradient(135deg,#079451,#007442); color:#fff; font-weight:800; font-size:14px; cursor:pointer; }
.alert { padding:12px 16px; border-radius:10px; margin-bottom:14px; font-size:14px; }
.alert--err { background:#fee2e2; color:#b91c1c; }
.alert--ok { background:#e8f7ef; color:#0b7a4b; }

.empty { padding:40px; text-align:center; color:var(--ulh-muted); background:#fff; border:1px dashed #dbe4ea; border-radius:14px; }

.pager { display:flex; gap:6px; margin-top:20px; flex-wrap:wrap; }
.pager a, .pager span { min-width:36px; height:36px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #dbe4ea; border-radius:8px; text-decoration:none; color:var(--ulh-ink); font-size:13px; }
.pager .is-active { background:var(--ulh-green); border-color:var(--ulh-green); color:#fff; }

@media (max-width: 1100px) {
  .pp-grid { grid-template-columns:1fr; }
  .cart-grid { grid-template-columns:1fr; }
  .ulh-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .ulh-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pp-gallery { grid-template-columns:1fr; }
  .pp-thumbs { flex-direction:row; max-height:none; overflow-x:auto; }
}

/* --- правки: кнопки и размер фото в карточках --- */
.ulh-page a.ulh-product-cart,
.ulh-page a.pp-buy,
.ulh-page a.cart-sum__btn,
.ulh-page button.form-btn,
.ulh-page button.a-order__admin,
.ulh-page .ulh-product-cart {
  color: #fff !important;
}
.ulh-page a.ulh-product-cart:hover,
.ulh-page a.pp-buy:hover,
.ulh-page a.cart-sum__btn:hover { color:#fff !important; text-decoration:none; }

.ulh-product-visual { overflow:hidden; }
.ulh-product-visual img.ulh-product-image,
.ulh-product-card .ulh-product-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
