diff --git a/public/assets/images/footer_bg_mobile.webp b/public/assets/images/footer_bg_mobile.webp new file mode 100644 index 0000000..61240ee Binary files /dev/null and b/public/assets/images/footer_bg_mobile.webp differ diff --git a/src/app/components/footer/footer.component.scss b/src/app/components/footer/footer.component.scss index ac96af0..30785d4 100644 --- a/src/app/components/footer/footer.component.scss +++ b/src/app/components/footer/footer.component.scss @@ -372,6 +372,10 @@ } @media (max-width: 768px) { + .dexar-footer-bg { + background-image: url('/assets/images/footer_bg_mobile.webp'); + } + .dexar-footer-container { padding: 32px 20px 16px; } @@ -407,7 +411,7 @@ } .dexar-footer-columns { - grid-template-columns: 1fr; - gap: 20px; + grid-template-columns: repeat(2, 1fr); + gap: 16px; } } diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index 4e2ecea..dd7fbcc 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -57,8 +57,8 @@ - - + + @@ -106,8 +106,8 @@ } - - + + @@ -120,4 +120,60 @@ + + + @if (menuOpen) { + + } + + + + + + + + Главная + + + + + + + + + + Каталог + + + + + + + + + + + + О нас + + + + + + + + + + Контакты + + + + + + + + + + } diff --git a/src/app/components/header/header.component.scss b/src/app/components/header/header.component.scss index af8877c..d90e12b 100644 --- a/src/app/components/header/header.component.scss +++ b/src/app/components/header/header.component.scss @@ -639,6 +639,70 @@ align-items: center; } +// Mobile Menu Backdrop +.dexar-menu-backdrop { + display: none; +} + +// Mobile Menu Panel +.dexar-mobile-menu { + display: none; +} + +// Mobile Menu Items +.dexar-mobile-item { + display: flex; + align-items: center; + gap: 14px; + width: 395px; + max-width: 100%; + height: 42px; + padding: 15px 26px; + background: #e9edf1; + border: 1px solid #d3dad9; + border-radius: 13px; + box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.15); + font-family: 'DM Sans', sans-serif; + font-size: 16px; + font-weight: 500; + color: #1e3c38; + text-decoration: none; + cursor: pointer; + transition: background 0.2s ease, transform 0.15s ease; + box-sizing: border-box; + + &:hover { + background: #dce2e7; + transform: translateY(-1px); + } + + &:active { + transform: translateY(0); + } + + svg:first-child { + flex-shrink: 0; + width: 24px; + height: 24px; + } + + span { + flex: 1; + } + + .dexar-mobile-chevron { + flex-shrink: 0; + margin-left: auto; + } +} + +.dexar-mobile-lang { + display: flex; + align-items: center; + justify-content: center; + margin-top: 16px; +} + .dexar-menu-toggle { display: none; flex-direction: column; @@ -756,45 +820,14 @@ padding: 0 16px; } + // Hide desktop nav .dexar-nav { - position: fixed; - top: 84px; - left: 0; - right: 0; - background: white; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); - max-height: 0; - overflow: hidden; - transition: max-height 0.3s ease; - - &.dexar-nav-open { - max-height: 400px; - } + display: none; } - .dexar-nav-group { - flex-direction: column; - width: 100%; - box-shadow: none; - } - - .dexar-nav-btn { - width: 100%; - border-radius: 0 !important; - border: none; - border-bottom: 1px solid #d3dad9; - padding: 16px !important; - font-size: 18px; - - &:hover { - background: rgba(161, 180, 181, 0.3); - } - } - - .dexar-nav-btn-left, - .dexar-nav-btn-middle, - .dexar-nav-btn-right { - padding: 16px !important; + // Hide desktop language selector + .dexar-lang-desktop { + display: none; } .dexar-search-wrapper { @@ -813,4 +846,77 @@ width: 100px; height: 32px; } + + // Mobile Menu Backdrop — full-screen, blurred, blocks interaction + .dexar-menu-backdrop { + display: block; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.35); + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); + z-index: 998; + animation: dexar-fade-in 0.25s ease; + } + + // Mobile Menu Panel + .dexar-mobile-menu { + display: flex; + flex-direction: column; + align-items: center; + gap: 12px; + position: fixed; + top: 84px; + right: 0; + width: 485px; + max-width: 100vw; + padding: 28px 20px 32px; + background: rgba(245, 242, 249, 0.93); + border-radius: 0 0 13px 13px; + box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25); + z-index: 999; + box-sizing: border-box; + + // Hide by default, animate in + max-height: 0; + padding-top: 0; + padding-bottom: 0; + overflow: hidden; + opacity: 0; + transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease; + + &.dexar-mobile-menu-open { + max-height: 576px; + padding: 28px 20px 32px; + opacity: 1; + } + } + + .dexar-mobile-item { + width: 395px; + max-width: 100%; + } + + .dexar-mobile-lang { + margin-top: 16px; + } +} + +@media (max-width: 480px) { + .dexar-mobile-menu { + width: 100vw; + border-radius: 0 0 13px 13px; + } + + .dexar-mobile-item { + width: 100%; + } +} + +@keyframes dexar-fade-in { + from { opacity: 0; } + to { opacity: 1; } } diff --git a/src/app/components/header/header.component.ts b/src/app/components/header/header.component.ts index 440f11d..7ee0c93 100644 --- a/src/app/components/header/header.component.ts +++ b/src/app/components/header/header.component.ts @@ -26,10 +26,12 @@ export class HeaderComponent { toggleMenu(): void { this.menuOpen = !this.menuOpen; + document.body.classList.toggle('dexar-menu-open', this.menuOpen); } closeMenu(): void { this.menuOpen = false; + document.body.classList.remove('dexar-menu-open'); } navigateToSearch(): void { diff --git a/src/app/components/items-carousel/items-carousel.component.html b/src/app/components/items-carousel/items-carousel.component.html index e0964ff..534ee39 100644 --- a/src/app/components/items-carousel/items-carousel.component.html +++ b/src/app/components/items-carousel/items-carousel.component.html @@ -20,17 +20,22 @@ @if (product.discount > 0) { - -{{ product.discount }}% + -{{ product.discount }}% } {{ product.name }} - - ⭐ {{ product.rating }} + @if (product.rating) { + + + + + {{ product.rating }} ({{ product.callbacks?.length || 0 }}) - + + } @@ -42,16 +47,15 @@ } - - - - + + + + - diff --git a/src/app/components/items-carousel/items-carousel.component.scss b/src/app/components/items-carousel/items-carousel.component.scss index cbf67fe..10e689e 100644 --- a/src/app/components/items-carousel/items-carousel.component.scss +++ b/src/app/components/items-carousel/items-carousel.component.scss @@ -127,12 +127,12 @@ // Item card styles .item-card { - background: white; + background: #ffffff; border-radius: 13px; border: 1px solid #d3dad9; overflow: hidden; - box-shadow: 0 3px 4px rgba(0, 0, 0, 0.08); - transition: all 0.3s ease; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); + transition: box-shadow 0.3s ease, transform 0.3s ease; position: relative; height: 100%; display: flex; @@ -142,7 +142,7 @@ margin: 0 auto; &:hover { - box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); + box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12); transform: translateY(-4px); } } @@ -158,56 +158,55 @@ .item-image { position: relative; width: 100%; - height: 140px; + height: 170px; overflow: hidden; - background: #f5f5f5; - border-radius: 13px; + background: #f5f3f9; img { width: 100%; height: 100%; object-fit: contain; - background: white; - padding: 10px; - transition: transform 0.3s ease, filter 0.3s ease; - filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); + padding: 12px; + transition: transform 0.4s ease; + box-sizing: border-box; } - &:hover img { - transform: scale(1.08); - filter: drop-shadow(0 8px 16px rgba(0,0,0,0.12)) brightness(1.05); + .item-card:hover & img { + transform: scale(1.06); } } .discount-badge { position: absolute; - top: 12px; - right: 12px; + top: 10px; + left: 10px; background: #ef4444; color: white; - padding: 0.4rem 0.8rem; + padding: 4px 10px; border-radius: 20px; - font-size: 0.875rem; + font-family: "DM Sans", sans-serif; + font-size: 0.75rem; font-weight: 700; - z-index: 10; + letter-spacing: 0.02em; + z-index: 2; + line-height: 1.3; } - - .item-details { - padding: 0.625rem; + padding: 12px 14px 14px; display: flex; flex-direction: column; - gap: 0.375rem; + gap: 6px; flex: 1; } .item-name { + font-family: "DM Sans", sans-serif; font-size: 0.8125rem; font-weight: 600; margin: 0; - line-height: 1.3; - min-height: 2.6em; + line-height: 1.35; + min-height: 2.2em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; @@ -216,20 +215,25 @@ color: #1e3c38; transition: color 0.2s; - &:hover { - color: var(--primary-color, #497671); + .item-card:hover & { + color: #497671; } } .item-rating { display: flex; align-items: center; - gap: 0.25rem; + gap: 4px; + font-family: "DM Sans", sans-serif; font-size: 0.75rem; - .rating-stars { - color: #497671; + svg { + flex-shrink: 0; + } + + .rating-value { font-weight: 600; + color: #1e3c38; } .rating-count { @@ -241,15 +245,18 @@ display: flex; align-items: center; justify-content: space-between; - gap: 0.5rem; + gap: 8px; + margin-top: auto; + padding-top: 4px; } .item-price { display: flex; align-items: baseline; - gap: 0.375rem; + gap: 6px; flex-wrap: wrap; flex: 1; + font-family: "DM Sans", sans-serif; .current-price, .discounted-price { @@ -263,20 +270,22 @@ } .original-price { - font-size: 0.8125rem; - color: #697777; + font-size: 0.75rem; + color: #a1b4b5; text-decoration: line-through; } } .cart-icon-btn { - padding: 0.5rem; - background: var(--primary-color, #497671); + width: 36px; + height: 36px; + padding: 0; + background: #497671; color: white; border: none; border-radius: 10px; cursor: pointer; - transition: all 0.3s ease; + transition: background 0.2s ease, transform 0.15s ease; display: flex; align-items: center; justify-content: center; @@ -284,11 +293,13 @@ svg { display: block; + width: 18px; + height: 18px; } &:hover { - background: var(--primary-hover, #3d635f); - transform: scale(1.05); + background: #3d635f; + transform: scale(1.08); } &:active { @@ -336,27 +347,27 @@ } .item-image { - height: 220px; + height: 160px; } } @media (max-width: 640px) { .item-image { - height: 200px; + height: 150px; } .item-details { - padding: 1rem; + padding: 10px 12px 12px; } .item-name { - font-size: 0.9rem; + font-size: 0.8125rem; } .item-price { .current-price, .discounted-price { - font-size: 1.125rem; + font-size: 1rem; } } } diff --git a/src/app/components/language-selector/language-selector.component.scss b/src/app/components/language-selector/language-selector.component.scss index 35b280c..baeb1e3 100644 --- a/src/app/components/language-selector/language-selector.component.scss +++ b/src/app/components/language-selector/language-selector.component.scss @@ -153,7 +153,8 @@ } // Dexar header specific styles -:host-context(.dexar-header) { +:host-context(.dexar-header), +:host-context(.dexar-mobile-menu) { .language-selector { width: 56px; height: 28px; @@ -245,7 +246,8 @@ } } - :host-context(.dexar-header) { + :host-context(.dexar-header), + :host-context(.dexar-mobile-menu) { .language-selector { width: 56px; height: 28px; diff --git a/src/app/pages/home/home.component.scss b/src/app/pages/home/home.component.scss index f0fbedf..2c84d3b 100644 --- a/src/app/pages/home/home.component.scss +++ b/src/app/pages/home/home.component.scss @@ -1161,17 +1161,19 @@ } .dexar-hero-actions { - flex-direction: column; - gap: 12px; + flex-direction: row; + gap: 10px; width: 100%; } .dexar-btn-primary, .dexar-btn-secondary { - width: 100%; - max-width: 280px; - height: 42px; - font-size: 17px; + flex: 1; + min-width: 0; + max-width: 180px; + height: 40px; + font-size: 14px; + letter-spacing: 0.5px; } .dexar-categories { @@ -1214,8 +1216,9 @@ .dexar-btn-primary, .dexar-btn-secondary { - height: 40px; - font-size: 16px; + height: 38px; + font-size: 13px; + max-width: 160px; } .dexar-categories { diff --git a/src/styles.scss b/src/styles.scss index 5f68299..a678ff6 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -70,6 +70,10 @@ body { background: #f5f5f5; min-height: 100vh; overflow-x: hidden; + + &.dexar-menu-open { + overflow: hidden; + } } /* Smooth Transitions */