🆙 Complete rebuild of toolbar / catalog / inventory make it 100% mobile friendly Take #1

This commit is contained in:
duckietm
2026-05-29 11:30:17 +02:00
parent fbcda88cd3
commit d0c11f047a
19 changed files with 680 additions and 488 deletions
+306 -78
View File
@@ -1,10 +1,52 @@
/* ---------------------------------------------------------------------------
* Catalog "classic" window — Habbo mobile shop redesign.
*
* Palette (from the mobile shop mockup):
* --cat-blue #4b7a94 header / app chrome
* --cat-blue-dark #385d73 header borders
* --cat-ink #233a47 strong outlines / active tab border
* --cat-strip #d9e2e8 tab strip + footer background
* --cat-tab #b7c7d1 inactive tab fill
* --cat-tab-border #7a9cb0 tab outline
* --cat-panel #eef2f5 sidebar / search panels
* --cat-sub #e1e7ec sub-node rows
* --cat-line #b7c7d1 card / divider lines
* --cat-canvas #d4dadf isometric preview canvas
* --cat-canvas-2 #c9cfd4 preview checker tiles
* --cat-select #3a82a7 selected card outline
* --cat-select-bg #f0f5f8 selected card fill
* --cat-gold #f7d673 price badge fill
* --cat-gold-border #d4af37 price badge outline
* --cat-gold-ink #4a3300 price badge text
* --cat-buy #009900 buy button
* ------------------------------------------------------------------------- */
.nitro-catalog-classic-window {
--cat-blue: #4b7a94;
--cat-blue-dark: #385d73;
--cat-ink: #233a47;
--cat-strip: #d9e2e8;
--cat-tab: #b7c7d1;
--cat-tab-border: #7a9cb0;
--cat-panel: #eef2f5;
--cat-sub: #e1e7ec;
--cat-line: #b7c7d1;
--cat-canvas: #d4dadf;
--cat-canvas-2: #c9cfd4;
--cat-select: #3a82a7;
--cat-select-bg: #f0f5f8;
--cat-gold: #f7d673;
--cat-gold-border: #d4af37;
--cat-gold-ink: #4a3300;
--cat-buy: #009900;
width: 640px !important;
height: 600px !important;
max-width: 640px !important;
min-width: 640px !important;
min-height: 600px !important;
max-height: 600px !important;
background: #ffffff !important;
}
.nitro-catalog-classic-window .nitro-card-title {
@@ -17,48 +59,62 @@
max-height: 38px;
}
/* Blue Habbo-mobile header. */
.nitro-catalog-classic-window .nitro-card-header {
background: var(--cat-blue);
border-color: var(--cat-blue);
border-bottom-color: var(--cat-ink);
}
.nitro-catalog-classic-admin-banner {
border-bottom: 1px solid rgba(0, 0, 0, 0.18);
background: linear-gradient(180deg, #f4d45d 0%, #d8b43e 100%);
}
/* Tab strip — light blue-grey shelf with tab "folders". */
.nitro-catalog-classic-tabs-shell {
flex-wrap: nowrap;
gap: 1px;
min-height: 30px;
max-height: 30px;
padding: 0 6px;
gap: 2px;
min-height: 32px;
max-height: 32px;
padding: 4px 6px 0;
overflow-x: auto;
overflow-y: hidden;
align-items: end;
background: #e7e8df;
border-bottom: 1px solid #b8beb4;
background: var(--cat-strip);
border-bottom: 2px solid var(--cat-ink);
}
.nitro-catalog-classic-tabs-shell .nitro-card-tab-item {
min-height: 28px;
padding: 5px 10px 4px;
border: 1px solid #8f8f8b;
padding: 5px 12px 4px;
border: 1px solid var(--cat-tab-border);
border-bottom: 0;
border-radius: 5px 5px 0 0;
background: linear-gradient(180deg, #fafaf7 0%, #dde2d9 100%);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
background: var(--cat-tab);
color: var(--cat-ink);
box-shadow: none;
white-space: nowrap;
font-weight: 700;
}
.nitro-catalog-classic-tabs-shell .nitro-card-tab-item:hover {
background: linear-gradient(180deg, #ffffff 0%, #e7ece4 100%);
background: #c7d4dd;
}
.nitro-catalog-classic-tabs-shell .nitro-card-tab-item-active {
background: #f2f2eb;
transform: translateY(0);
background: #ffffff;
color: #000000;
position: relative;
top: 1px;
border-color: var(--cat-ink);
box-shadow: inset 0 -1px 0 #ffffff;
font-weight: 700;
}
.nitro-catalog-classic-content-shell {
padding: 6px 8px 8px !important;
background: #ffffff !important;
}
.nitro-catalog-classic-stage {
@@ -82,75 +138,83 @@
}
.nitro-catalog-classic-search-shell {
padding: 3px;
border: 1px solid #a7aba1;
padding: 4px;
border: 1px solid var(--cat-line);
border-radius: 4px;
background: linear-gradient(180deg, #f9f8f2 0%, #eaede5 100%);
background: var(--cat-panel);
}
.nitro-catalog-classic-search-shell input {
height: 18px;
height: 20px;
padding-top: 0 !important;
padding-bottom: 0 !important;
border-width: 1px !important;
border-color: #8f9588 !important;
border-color: var(--cat-tab-border) !important;
border-radius: 3px !important;
background: #fff !important;
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08);
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06);
}
.nitro-catalog-classic-search-shell svg {
color: #61645b !important;
color: #5b7080 !important;
}
/* Sidebar category tree — flat rows that echo the mockup's landscape sidebar. */
.nitro-catalog-classic-navigation-shell {
flex: 1 1 auto;
min-height: 0;
padding: 3px 2px 3px 3px;
border: 1px solid #a7aba1;
padding: 4px 0;
border: 1px solid var(--cat-line);
border-radius: 4px;
background: linear-gradient(180deg, #f1f2ec 0%, #d8ddd3 100%);
background: var(--cat-panel);
overflow: auto;
}
.nitro-catalog-classic-navigation-list {
display: flex;
flex-direction: column;
gap: 2px;
gap: 0;
}
.nitro-catalog-classic-navigation-node.is-child {
margin-left: 10px;
.nitro-catalog-classic-navigation-node.is-child .nitro-catalog-classic-navigation-item {
padding-left: 22px;
background: var(--cat-sub);
}
.nitro-catalog-classic-navigation-item {
display: flex;
align-items: center;
gap: 4px;
min-height: 21px;
padding: 1px 6px 1px 5px;
border: 1px solid #bdc2ba;
border-radius: 4px;
background: linear-gradient(180deg, #f6f7f2 0%, #e6e9e1 100%);
color: #2e2e2e;
gap: 6px;
min-height: 28px;
padding: 4px 10px;
border: 0;
border-left: 4px solid transparent;
border-radius: 0;
background: transparent;
color: var(--cat-ink);
font-weight: 700;
cursor: pointer;
transition: background-color 0.12s ease, border-color 0.12s ease;
transition: background-color 0.12s ease;
}
.nitro-catalog-classic-navigation-node.is-child .nitro-catalog-classic-navigation-item {
font-weight: 400;
}
.nitro-catalog-classic-navigation-item:hover {
background: linear-gradient(180deg, #ffffff 0%, #ebeee6 100%);
border-color: #9ea79b;
background: #dde6ec;
}
.nitro-catalog-classic-navigation-item.is-active {
background: linear-gradient(180deg, #dae7f0 0%, #c4d2de 100%);
border-color: #8e9ba5;
background: #ffffff;
border-left-color: var(--cat-blue);
color: #000000;
font-weight: 700;
}
.nitro-catalog-classic-navigation-item.is-drag-over {
outline: 2px solid rgba(48, 114, 140, 0.35);
outline-offset: 1px;
outline: 2px solid rgba(58, 130, 167, 0.4);
outline-offset: -2px;
}
.nitro-catalog-classic-navigation-icon {
@@ -188,18 +252,19 @@
}
.nitro-catalog-classic-navigation-caret {
color: #676d66 !important;
color: #5b7080 !important;
}
/* Right-hand content column. */
.nitro-catalog-classic-layout-shell {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
height: 100%;
border: 1px solid #a7aba1;
border: 1px solid var(--cat-line);
border-radius: 4px;
background: linear-gradient(180deg, #eceee7 0%, #dfe4da 100%);
background: #ffffff;
overflow: hidden;
}
@@ -207,10 +272,10 @@
display: flex;
flex-direction: column;
gap: 3px;
min-height: 66px;
padding: 5px 7px;
border-bottom: 1px solid #c8cdc3;
background: linear-gradient(180deg, #f6f6f2 0%, #e9ece4 100%);
min-height: 0;
padding: 6px 8px;
border-bottom: 1px solid var(--cat-line);
background: #ffffff;
}
.nitro-catalog-classic-layout-hero {
@@ -234,7 +299,7 @@
flex: 1 1 auto;
min-height: 0;
padding: 6px;
background: #f2f2eb;
background: #ffffff;
overflow: hidden;
}
@@ -242,58 +307,91 @@
gap: 8px;
}
/* Offer / detail card — the mockup's preview + info panel. */
.nitro-catalog-classic-offer-panel,
.nitro-catalog-classic-welcome {
border: 1px solid #bfc4bc;
border: 1px solid var(--cat-line);
border-radius: 6px;
background: linear-gradient(180deg, #ffffff 0%, #f3f3ed 100%);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
background: #ffffff;
}
.nitro-catalog-classic-offer-panel {
min-height: 132px;
overflow: hidden;
}
/* Isometric checkered preview canvas, straight from the mockup. */
.nitro-catalog-classic-offer-preview {
width: 136px;
min-width: 136px;
padding: 8px;
border-right: 1px solid #c9cec5;
background: linear-gradient(180deg, #eef2ea 0%, #dde3d8 100%);
border-right: 1px solid var(--cat-line);
background-color: var(--cat-canvas);
background-image:
linear-gradient(30deg, var(--cat-canvas-2) 25%, transparent 25%),
linear-gradient(-30deg, var(--cat-canvas-2) 25%, transparent 25%),
linear-gradient(30deg, transparent 75%, var(--cat-canvas-2) 75%),
linear-gradient(-30deg, transparent 75%, var(--cat-canvas-2) 75%);
background-size: 30px 17px;
}
.nitro-catalog-classic-offer-info {
padding: 10px;
}
/* Solid-gold price pills (mockup price badge). */
.nitro-catalog-classic-offer-info .rounded-full {
background: var(--cat-gold) !important;
border-color: var(--cat-gold-border) !important;
}
.nitro-catalog-classic-offer-info .rounded-full,
.nitro-catalog-classic-offer-info .rounded-full * {
color: var(--cat-gold-ink) !important;
}
.nitro-catalog-classic-welcome {
min-height: 128px;
padding: 10px;
}
/* Product grid. */
.nitro-catalog-classic-grid-shell {
min-height: 150px;
padding: 4px;
border: 1px solid #bcc2b8;
padding: 6px;
border: 1px solid var(--cat-line);
border-radius: 6px;
background: linear-gradient(180deg, #f5f5f0 0%, #e4e7de 100%);
background: #ffffff;
height: auto;
flex: 1 1 auto;
}
.nitro-catalog-classic-grid {
gap: 4px !important;
gap: 6px !important;
align-content: start;
}
.nitro-catalog-classic-window .layout-grid-item {
height: 54px;
border: 1px solid #b8beb6 !important;
border-radius: 6px !important;
background-color: #d7dde2;
border: 1px solid var(--cat-line) !important;
border-radius: 4px !important;
background-color: #ffffff;
background-image: none;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
box-shadow: none;
transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.nitro-catalog-classic-window .layout-grid-item:hover {
background-color: var(--cat-select-bg) !important;
border-color: var(--cat-select) !important;
box-shadow: 0 0 0 1px rgba(58, 130, 167, 0.2);
}
.nitro-catalog-classic-window .layout-grid-item.is-active {
background-color: #e5ebef !important;
border-color: #8f978b !important;
background-color: var(--cat-select-bg) !important;
border-color: var(--cat-select) !important;
border-width: 2px !important;
box-shadow: 0 0 0 1px rgba(58, 130, 167, 0.35);
}
.nitro-catalog-classic-grid-offer-icon {
@@ -309,9 +407,9 @@
min-height: 56px;
margin-bottom: 6px;
padding: 4px 6px;
border: 1px solid #bec3ba;
border: 1px solid var(--cat-line);
border-radius: 6px;
background: linear-gradient(180deg, #ffffff 0%, #f2f2ec 100%);
background: #ffffff;
}
.nitro-catalog-classic-window .nitro-catalog-header img {
@@ -322,13 +420,19 @@
object-fit: contain;
}
/* Green "buy" action button (mockup "Acquista"). */
.nitro-catalog-classic-offer-info .bg-\[\#00800b\] {
background-color: var(--cat-buy) !important;
border-color: #007a00 !important;
}
.nitro-catalog-classic-breadcrumb {
display: flex;
align-items: center;
gap: 5px;
min-height: 16px;
overflow: hidden;
color: #666a63;
color: #5b7080;
font-size: 10px;
line-height: 1;
white-space: nowrap;
@@ -342,9 +446,10 @@
}
.nitro-catalog-classic-breadcrumb-separator {
color: #9ea395;
color: #94a7b3;
}
/* Scrollbars — blue-grey to match the chrome. */
.nitro-catalog-classic-navigation-shell::-webkit-scrollbar,
.nitro-catalog-classic-layout-container :is(.overflow-auto, .nitro-card-content-shell, .nitro-catalog-classic-grid-shell)::-webkit-scrollbar {
width: 12px;
@@ -352,43 +457,166 @@
.nitro-catalog-classic-navigation-shell::-webkit-scrollbar-track,
.nitro-catalog-classic-layout-container :is(.overflow-auto, .nitro-card-content-shell, .nitro-catalog-classic-grid-shell)::-webkit-scrollbar-track {
border-left: 1px solid #c2c6be;
background: #dde2d8;
border-left: 1px solid var(--cat-line);
background: var(--cat-panel);
}
.nitro-catalog-classic-navigation-shell::-webkit-scrollbar-thumb,
.nitro-catalog-classic-layout-container :is(.overflow-auto, .nitro-card-content-shell, .nitro-catalog-classic-grid-shell)::-webkit-scrollbar-thumb {
border: 1px solid #7d8680;
border: 1px solid var(--cat-tab-border);
border-radius: 6px;
background: linear-gradient(180deg, #a8b3ae 0%, #89948f 100%);
background: linear-gradient(180deg, #a9bcc9 0%, #89a0ae 100%);
}
.nitro-catalog-classic-navigation-shell::-webkit-scrollbar-button:single-button:vertical:decrement,
.nitro-catalog-classic-layout-container :is(.overflow-auto, .nitro-card-content-shell, .nitro-catalog-classic-grid-shell)::-webkit-scrollbar-button:single-button:vertical:decrement {
height: 12px;
background: #dde2d8;
background: var(--cat-panel);
}
.nitro-catalog-classic-navigation-shell::-webkit-scrollbar-button:single-button:vertical:increment,
.nitro-catalog-classic-layout-container :is(.overflow-auto, .nitro-card-content-shell, .nitro-catalog-classic-grid-shell)::-webkit-scrollbar-button:single-button:vertical:increment {
height: 12px;
background: #dde2d8;
background: var(--cat-panel);
}
@media (max-width: 991.98px) {
/* ---------------------------------------------------------------------------
* Responsive layout
*
* Three tiers:
* > 1024px desktop, fixed 640x600 (default rules above)
* 641px - 1024px tablet, fluid card, single-column stage
* <= 640px phone, full-screen modal with stacked layout +
* larger touch targets and a horizontally
* scrollable tab strip
*
* A separate short-landscape branch trims chrome when height <= 480px
* (typical phone-in-landscape) so the grid still has room to breathe.
* ------------------------------------------------------------------------- */
/* Tablet (portrait + landscape between phone and desktop). */
@media (max-width: 1024px) and (min-width: 641px) {
.nitro-catalog-classic-window {
width: min(calc(100vw - 16px), 570px) !important;
width: min(calc(100vw - 24px), 720px) !important;
min-width: 0 !important;
height: min(calc(100vh - 16px), 635px) !important;
max-width: calc(100vw - 24px) !important;
height: min(calc(100vh - 24px), 720px) !important;
min-height: 0 !important;
max-width: calc(100vw - 16px) !important;
max-height: calc(100vh - 24px) !important;
}
/* Drop the sidebar to a horizontal row above the content so the grid
* has the full card width on the narrower tablet viewports. */
.nitro-catalog-classic-stage {
grid-template-columns: minmax(0, 1fr);
}
.nitro-catalog-classic-sidebar {
max-height: 180px;
max-height: 200px;
}
}
/* Phone — portrait and landscape. */
@media (max-width: 640px) {
.nitro-catalog-classic-window {
width: 100vw !important;
min-width: 0 !important;
max-width: 100vw !important;
height: 100vh !important;
min-height: 0 !important;
max-height: 100vh !important;
/* Drop the soft drop-shadow / outer border on full-screen so it
* blends with the viewport edges. */
border-radius: 0 !important;
}
/* Tabs become a horizontally scrollable strip with bigger tap targets
* (≥ 44px tall is the WCAG / iOS recommendation). */
.nitro-catalog-classic-tabs-shell {
min-height: 44px;
max-height: 44px;
padding: 4px 4px 0;
-webkit-overflow-scrolling: touch;
}
.nitro-catalog-classic-tabs-shell .nitro-card-tab-item {
min-height: 42px;
padding: 6px 14px;
font-size: 12px;
}
.nitro-catalog-classic-content-shell {
padding: 6px !important;
}
.nitro-catalog-classic-stage {
grid-template-columns: minmax(0, 1fr);
gap: 6px;
}
/* Sidebar above content, capped so most of the viewport is the grid. */
.nitro-catalog-classic-sidebar {
max-height: 33vh;
}
/* Search input + nav items grow into real touch targets. */
.nitro-catalog-classic-search-shell input {
height: 28px;
font-size: 13px;
}
.nitro-catalog-classic-navigation-item {
min-height: 40px;
padding: 6px 12px;
}
.nitro-catalog-classic-navigation-label {
font-size: 13px;
}
/* Bigger furni icons in the grid so a fingertip can hit them. */
.nitro-catalog-classic-window .layout-grid-item {
height: 64px;
}
/* Modal corner radius cleanups so the full-screen look is consistent. */
.nitro-catalog-classic-window .nitro-card-header-shell,
.nitro-catalog-classic-window .nitro-card-content-shell {
border-radius: 0 !important;
}
}
/* Phone in landscape — short viewport. Trim header / hero so the grid keeps
* usable height. Triggers regardless of portrait/landscape on any short
* screen, which is also the right answer for very small laptop windows. */
@media (max-height: 480px) {
.nitro-catalog-classic-window {
height: 100vh !important;
max-height: 100vh !important;
}
.nitro-catalog-classic-window .nitro-card-header-shell {
min-height: 32px;
max-height: 32px;
}
.nitro-catalog-classic-tabs-shell {
min-height: 38px;
max-height: 38px;
}
.nitro-catalog-classic-layout-header-shell {
min-height: 0;
padding: 3px 6px;
}
/* Hide the marketing hero image in landscape - it's the first thing to
* sacrifice when the user clearly wants more grid. */
.nitro-catalog-classic-layout-hero {
display: none;
}
.nitro-catalog-classic-sidebar {
max-height: 26vh;
}
}