- Merge navbar-mobile-fix.css into navbar.css (single source) - Remove navbar-mobile-fix.css references from all HTML pages - Update navbar.css version for cache busting (v1768447584) - Add security meta headers to all main pages: * X-Content-Type-Options: nosniff * X-Frame-Options: SAMEORIGIN * X-XSS-Protection: 1; mode=block * Referrer-Policy: strict-origin-when-cross-origin - Archive navbar-mobile-fix.css (merged into navbar.css)
281 lines
4.9 KiB
CSS
281 lines
4.9 KiB
CSS
/**
|
|
* Mobile Navbar Fixes
|
|
* Ensures hamburger menu, cart, and wishlist are visible on mobile devices
|
|
*/
|
|
|
|
/* Mobile hamburger menu - always visible on small screens */
|
|
@media (max-width: 768px) {
|
|
.mobile-toggle {
|
|
display: flex !important;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.toggle-line {
|
|
width: 24px;
|
|
height: 3px;
|
|
background-color: #202023;
|
|
border-radius: 2px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
/* Hide desktop menu on mobile */
|
|
.navbar-menu {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Ensure cart and wishlist icons are visible */
|
|
.navbar-actions {
|
|
display: flex !important;
|
|
gap: 12px;
|
|
align-items: center;
|
|
}
|
|
|
|
.action-item {
|
|
display: block !important;
|
|
}
|
|
|
|
.action-btn {
|
|
display: flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
color: #202023;
|
|
font-size: 20px;
|
|
}
|
|
|
|
.action-btn i {
|
|
display: block !important;
|
|
}
|
|
|
|
.action-badge {
|
|
display: flex !important;
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 2px;
|
|
background: #fcb1d8;
|
|
color: #202023;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.action-badge.show {
|
|
opacity: 1 !important;
|
|
visibility: visible !important;
|
|
}
|
|
|
|
/* Mobile menu overlay */
|
|
.mobile-menu-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: all 0.3s ease;
|
|
z-index: 999;
|
|
}
|
|
|
|
.mobile-menu-overlay.active {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
/* Mobile menu sidebar */
|
|
.mobile-menu {
|
|
position: fixed;
|
|
top: 0;
|
|
right: -100%;
|
|
width: 80%;
|
|
max-width: 300px;
|
|
height: 100vh;
|
|
background: white;
|
|
box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
|
|
transition: right 0.3s ease;
|
|
z-index: 1000;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
.mobile-menu.active {
|
|
right: 0;
|
|
}
|
|
|
|
.mobile-menu-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 24px;
|
|
padding-bottom: 16px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.mobile-brand {
|
|
font-family: "Roboto", sans-serif;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #202023;
|
|
}
|
|
|
|
.mobile-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
color: #202023;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mobile-menu-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.mobile-menu-list li {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.mobile-link {
|
|
display: block;
|
|
padding: 12px 16px;
|
|
color: #202023;
|
|
text-decoration: none;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
border-radius: 8px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.mobile-link:hover,
|
|
.mobile-link:focus {
|
|
background: #ffebeb;
|
|
color: #fcb1d8;
|
|
}
|
|
|
|
/* Dropdown menus on mobile */
|
|
.action-dropdown {
|
|
position: fixed !important;
|
|
right: 0;
|
|
left: 0;
|
|
top: auto;
|
|
bottom: 0;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
max-height: 70vh;
|
|
border-radius: 16px 16px 0 0 !important;
|
|
transform: translateY(100%) !important;
|
|
}
|
|
|
|
.action-dropdown.show {
|
|
transform: translateY(0) !important;
|
|
}
|
|
|
|
/* Compact dropdown on mobile */
|
|
.dropdown-head {
|
|
padding: 16px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.dropdown-head h3 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.dropdown-body {
|
|
max-height: calc(70vh - 140px);
|
|
overflow-y: auto;
|
|
padding: 12px;
|
|
}
|
|
|
|
.dropdown-foot {
|
|
padding: 12px 16px;
|
|
border-top: 1px solid #f0f0f0;
|
|
}
|
|
|
|
/* Prevent body scroll when menu is open */
|
|
body.menu-open {
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
/* Tablet adjustments */
|
|
@media (min-width: 769px) and (max-width: 1024px) {
|
|
.navbar-actions {
|
|
gap: 16px;
|
|
}
|
|
|
|
.action-btn {
|
|
font-size: 22px;
|
|
}
|
|
|
|
.action-dropdown {
|
|
max-width: 360px !important;
|
|
}
|
|
}
|
|
|
|
/* Desktop - hide mobile elements */
|
|
@media (min-width: 769px) {
|
|
.mobile-toggle {
|
|
display: none !important;
|
|
}
|
|
|
|
.mobile-menu,
|
|
.mobile-menu-overlay {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
/* Accessibility improvements */
|
|
.action-btn:focus,
|
|
.mobile-toggle:focus,
|
|
.mobile-close:focus {
|
|
outline: 2px solid #fcb1d8;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.mobile-link:focus {
|
|
outline: 2px solid #fcb1d8;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* Smooth transitions */
|
|
* {
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
button {
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
}
|
|
|
|
/* Fix for iOS Safari button styling */
|
|
button:focus {
|
|
outline: none;
|
|
}
|
|
|
|
button:focus-visible {
|
|
outline: 2px solid #fcb1d8;
|
|
outline-offset: 2px;
|
|
}
|