*{box-sizing:border-box}body{margin:0;background:#f5f6f7;color:#1c252c;font:16px/1.55 system-ui,-apple-system,Segoe UI,Arial,sans-serif}a{color:#2c4b5e}header{background:#18232b;color:#fff;padding:18px max(4%,calc((100% - 1180px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}header a{color:#fff;text-decoration:none}nav{display:flex;gap:20px;flex-wrap:wrap}.brand{font-weight:750;letter-spacing:.035em}.brand b{background:#ffd42a;color:#111;padding:9px 10px;margin-right:9px;border-radius:6px}main{max-width:1180px;margin:0 auto;padding:30px 20px;min-height:75vh}.hero{padding:75px 6%;border-radius:14px;background:#202e37;color:#fff;margin-bottom:45px}.hero h1{font-size:clamp(34px,5vw,62px);line-height:1.12;margin:15px 0}.hero p{max-width:670px;font-size:19px;color:#d6e0e4}.button,button{display:inline-block;background:#ffd42a;color:#171d20;border:0;border-radius:6px;padding:12px 18px;font-weight:750;text-decoration:none;cursor:pointer}.pill{display:inline-block;background:#ffe28c;color:#1d262c;border-radius:4px;padding:4px 9px;font-size:12px;font-weight:800;letter-spacing:.04em}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}.card,.panel{background:#fff;border:1px solid #e0e4e6;border-radius:12px;padding:24px}.card h3{font-size:22px}.equipment-art{height:140px;background:#edf0f1;border-radius:8px;display:grid;place-items:center;font-size:60px;margin-bottom:16px}.panel{margin-bottom:22px}.narrow{max-width:560px;margin:25px auto}.subnav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:26px}.subnav a{background:#e5eaed;border-radius:6px;padding:9px 12px;text-decoration:none}label{display:block;margin:14px 0;font-weight:650}input,textarea,select{display:block;width:100%;max-width:650px;padding:11px;border:1px solid #bfcbd1;border-radius:6px;background:#fff;font:inherit;margin-top:5px}textarea{min-height:110px}.check input{width:auto;display:inline-block}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.stats strong{font-size:38px}table{width:100%;border-collapse:collapse;background:#fff;margin:20px 0;display:block;overflow-x:auto}th,td{text-align:left;border-bottom:1px solid #e5e8eb;padding:13px;vertical-align:top}th{background:#e8eef1}.muted{color:#58656e;font-size:14px}.error{color:#ac2631}footer{text-align:center;padding:32px 16px;background:#18232b;color:#cbd4da}@media(max-width:650px){.stats{grid-template-columns:1fr}.hero{padding:40px 22px}header{padding:20px}}
.equipment-photo{width:100%;height:100%;object-fit:cover;border-radius:8px}.gallery{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.gallery img{width:260px;max-width:100%;height:180px;object-fit:cover;border-radius:12px}.photo-admin{display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-top:1px solid #ddd;padding:10px 0}.photo-admin img{width:100px;height:70px;object-fit:cover}.photo-admin form{margin:0}.calendar-scroll{overflow:auto;max-width:100%}.calendar-table{border-collapse:collapse;min-width:1000px}.calendar-table th,.calendar-table td{border:1px solid #ddd;text-align:center;padding:7px;min-width:25px}.calendar-table th:first-child{min-width:190px;text-align:left;position:sticky;left:0;background:#fff}.calendar-table small{display:block;font-weight:normal}.calendar-table .busy{background:#f5bb36;color:#222}.calendar-table .free{color:#999}
/* Catalog photos: fixed frame and contained image */
.cards > .card { min-width: 0; overflow: hidden; }
.cards .equipment-art {
  width: 100%; height: 220px; max-width: 100%;
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cards .equipment-art img {
  display: block !important;
  width: 100% !important; max-width: 100% !important;
  height: 100% !important; max-height: 100% !important;
  object-fit: contain !important; object-position: center !important;
  position: static !important; margin: 0 !important;
  border-radius: 8px;
}

/* v0.6 admin refinements */
.booking-edit{min-width:220px;max-width:300px;margin-bottom:10px}.booking-edit label{font-size:13px;margin:6px 0}.booking-edit input{min-width:0;width:100%;padding:7px}.booking-edit button{padding:8px 12px}.calendar-table .maintenance{background:#e4e8eb;color:#5b6470}.calendar-table .inactive{background:#f2dada;color:#8d4141}

/* v0.7 public catalog and product forms */
.cards>.card{min-width:0;overflow:hidden}
.cards .equipment-art{height:220px;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative}
.cards .equipment-art img{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important;position:static!important;margin:0!important}
.category-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 22px}
.category-tabs a{display:inline-block;padding:10px 15px;background:#e7ecef;border-radius:7px;text-decoration:none;color:#1c252c;font-weight:650}
.category-tabs a.active{background:#ffd42a}
.catalog-item{display:flex;flex-direction:column;align-items:flex-start}
.catalog-item .equipment-art{flex-shrink:0}
.catalog-item p:last-child{margin-top:auto;padding-top:15px}
.product-page .gallery{display:flex;flex-wrap:wrap;gap:12px}
.product-page .gallery img{width:260px;max-width:100%;height:185px;object-fit:contain;background:#edf0f1;border-radius:10px}
.prices{display:flex;flex-wrap:wrap;gap:14px;margin:20px 0}
.prices>div{background:#f1f4f5;padding:14px 18px;border-radius:9px;min-width:155px}
.prices small{display:block;color:#59656c}.prices strong{font-size:22px}
.request-form{max-width:680px}.request-form input,.request-form textarea{max-width:100%}
.estimate{padding:16px;background:#fff6d5;border-radius:8px;margin:16px 0}.estimate strong{font-size:22px}
@media(max-width:650px){.category-tabs a{flex:1;text-align:center}.product-page{padding:18px}.prices>div{flex:1}}

/* v0.7 — таблица заявок: не сжимать поле статуса */
main table:has(select[name="status"]) {
    display: block;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    table-layout: auto;
    border-collapse: collapse;
}
main table:has(select[name="status"]) th:last-child,
main table:has(select[name="status"]) td:last-child {
    min-width: 200px;
    width: 200px;
    white-space: nowrap;
}
main table:has(select[name="status"]) td:last-child form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 175px;
    min-width: 175px;
    margin: 0;
}
main table:has(select[name="status"]) select[name="status"] {
    display: block;
    box-sizing: border-box;
    width: 175px !important;
    min-width: 175px !important;
    max-width: none !important;
    height: 48px;
    padding: 8px 30px 8px 12px;
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
}
main table:has(select[name="status"]) td:last-child button {
    width: 100%;
    margin: 0;
}

/* Leads table: fixed status width and independent horizontal scrolling */
.leads-table-scroll {width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.leads-table-scroll .leads-table {display:table;width:100%;min-width:1050px;table-layout:fixed;border-collapse:collapse;margin:0;}
.leads-table th,.leads-table td {vertical-align:top;overflow-wrap:break-word;}
.leads-table .leads-status-cell {width:210px;min-width:210px;white-space:nowrap;}
.leads-table .leads-status-form {display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:0;width:180px;min-width:180px;}
.leads-table .leads-status-form select[name="status"] {box-sizing:border-box;display:block;width:180px!important;min-width:180px!important;max-width:none!important;height:48px;margin:0;padding:10px 32px 10px 12px;font-size:16px;white-space:nowrap;}
.leads-table .leads-status-form button {width:auto;min-width:80px;margin:0;}

/* v0.7.1 category pages */
.catalog-breadcrumb{margin:0 0 22px;color:#58656e}.catalog-breadcrumb a{color:#2c4b5e}.catalog-category-links{margin:0 0 22px}.category-description{margin-top:30px;white-space:normal}.category-tabs a{white-space:normal}

/* v0.7.2: catalog category filter and consistent card sizing */
.catalog-filter-tabs {display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;margin:20px 0 26px;}
.catalog-filter-tabs a {display:inline-flex;align-items:center;justify-content:center;white-space:normal;text-align:center;line-height:1.35;padding:11px 16px;border-radius:8px;background:#e7ecef;color:#1c252c;text-decoration:none;font-weight:650;border:1px solid #d6e0e5;transition:background .15s ease;}
.catalog-filter-tabs a:hover {background:#dce5e9;}
.catalog-filter-tabs a.active {background:#ffd42a;border-color:#ffd42a;color:#171d20;}
.catalog-category-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch;}
.catalog-category-grid > .catalog-item {width:100%;min-width:0;max-width:none;}
.catalog-category-grid > .catalog-item .equipment-art {height:220px;}
@media(max-width:900px){.catalog-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.catalog-category-grid{grid-template-columns:1fr;}.catalog-filter-tabs a{flex:0 1 auto;}}

/* v0.7.3: category cards never grow to fill an empty row */
.catalog-category-grid {display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))!important;gap:20px;align-items:stretch;justify-content:start;}
.catalog-category-grid > .catalog-category-card {width:100%;max-width:380px;min-width:0;}
.catalog-category-grid > .catalog-category-card .equipment-art {width:100%;height:205px;overflow:hidden;}
.catalog-category-grid > .catalog-category-card .equipment-art img {max-width:100%;object-fit:contain;}
@media(max-width:650px){.catalog-category-grid{grid-template-columns:minmax(0,1fr)!important;}.catalog-category-grid>.catalog-category-card{max-width:100%;}}

/* v0.7.4 — distinct catalog navigation patterns */
.catalog-filter-tabs.crane-weight-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;max-width:640px;margin:22px 0 28px;border:1px solid #d5dce0;border-radius:9px;overflow:hidden;background:#fff;}
.crane-weight-grid a{display:flex;min-height:49px;padding:10px 8px;border:0;border-right:1px solid #d5dce0;border-bottom:1px solid #d5dce0;border-radius:0;background:#fff;text-align:center;font-size:14px;}
.crane-weight-grid a:nth-child(3n){border-right:0;}
.crane-weight-grid a.active{background:#ffd42a;border-color:#d5dce0;}
.catalog-filter-tabs.excavator-type-list{display:flex;flex-direction:column;align-items:stretch;gap:0;max-width:420px;margin:22px 0 28px;border:1px solid #d5dce0;border-radius:9px;overflow:hidden;}
.excavator-type-list a{display:flex;justify-content:flex-start;border:0;border-bottom:1px solid #d5dce0;border-radius:0;padding:14px 18px;background:#fff;text-align:left;}
.excavator-type-list a:last-child{border-bottom:0;}
.excavator-type-list a.active{background:#ffd42a;}
@media(max-width:650px){.catalog-filter-tabs.crane-weight-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.crane-weight-grid a:nth-child(3n){border-right:1px solid #d5dce0;}.crane-weight-grid a:nth-child(2n){border-right:0;}}

.subnav{display:flex;flex-wrap:wrap;gap:8px}
.subnav a{white-space:nowrap}
