/** * COMPLETE RESPONSIVE FRAMEWORK * Mobile-First Design for All Device Sizes * Tested on: iPhone SE/8/12/14, Galaxy S21/S23, iPad, iPad Pro, Desktop */ /* ======================================== ROOT VARIABLES & BASE RESET ======================================== */ :root { /* Breakpoints */ --bp-xs: 375px; --bp-sm: 640px; --bp-md: 768px; --bp-lg: 1024px; --bp-xl: 1280px; --bp-2xl: 1536px; /* Spacing Scale */ --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; /* Font Sizes (Fluid) */ --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem); --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem); --text-base: clamp(1rem, 0.9rem + 0.4vw, 1.125rem); --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem); --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); --text-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); --text-3xl: clamp(1.875rem, 1.5rem + 1.5vw, 3rem); /* Colors */ --color-primary: #FCB1D8; --color-primary-dark: #F6CCDE; --color-secondary: #FFD0D0; --color-accent: #667eea; --color-text: #202023; --color-text-light: #6b7280; --color-background: #FFEBEB; --color-white: #ffffff; --color-error: #ef4444; --color-success: #10b981; } /* Base Reset */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; } body { margin: 0; padding: 0; font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: var(--text-base); line-height: 1.6; color: var(--color-text); background-color: var(--color-background); overflow-x: hidden; min-height: 100vh; } img { max-width: 100%; height: auto; display: block; } button { font-family: inherit; cursor: pointer; } /* ======================================== CONTAINER SYSTEM ======================================== */ .container { width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: var(--space-md); padding-right: var(--space-md); } @media (min-width: 640px) { .container { padding-left: var(--space-lg); padding-right: var(--space-lg); } } @media (min-width: 1024px) { .container { padding-left: var(--space-2xl); padding-right: var(--space-2xl); } } .container-fluid { width: 100%; padding-left: var(--space-md); padding-right: var(--space-md); } /* ======================================== RESPONSIVE GRID SYSTEM ======================================== */ .grid { display: grid; gap: var(--space-md); } /* Mobile First - Single Column */ .products-grid, .grid-responsive { display: grid; grid-template-columns: 1fr; gap: var(--space-md); width: 100%; } /* Small Phones (375px+) */ @media (min-width: 375px) { .products-grid { gap: var(--space-lg); } } /* Tablets & Large Phones (640px+) - 2 columns */ @media (min-width: 640px) { .products-grid, .grid-responsive { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); } } /* Medium Tablets (768px+) - 3 columns */ @media (min-width: 768px) { .products-grid { grid-template-columns: repeat(3, 1fr); } } /* Desktop (1024px+) - 4 columns */ @media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); } } /* Large Desktop (1280px+) */ @media (min-width: 1280px) { .products-grid { gap: 32px; } } /* ======================================== PRODUCT CARDS - FULLY RESPONSIVE ======================================== */ .product-card { display: flex; flex-direction: column; height: 100%; background: var(--color-white); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(252, 177, 216, 0.15); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; } .product-card:hover { box-shadow: 0 8px 24px rgba(252, 177, 216, 0.25); transform: translateY(-4px); } /* Product Image Container */ .product-image { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #f9fafb; } .product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; } .product-card:hover .product-image img { transform: scale(1.08); } /* Product Info Section */ .product-info { flex: 1; display: flex; flex-direction: column; padding: 12px; gap: 6px; } @media (min-width: 640px) { .product-info { padding: 16px; gap: 8px; } } .product-info h3, .product-title { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.4; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 40px; } @media (min-width: 640px) { .product-info h3, .product-title { font-size: 15px; min-height: 42px; } } @media (min-width: 1024px) { .product-info h3, .product-title { font-size: 16px; min-height: 44px; } } .product-description { font-size: 13px; color: var(--color-text-light); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex: 1; min-height: 40px; } @media (min-width: 640px) { .product-description { font-size: 14px; -webkit-line-clamp: 3; min-height: 63px; } } /* Product Price */ .product-card .price, .product-price { font-size: 18px; font-weight: 700; color: var(--color-primary); margin: 4px 0; } @media (min-width: 640px) { .product-card .price, .product-price { font-size: 20px; } } /* Product Actions */ .product-actions { display: flex; gap: 8px; padding: 0 12px 12px 12px; margin-top: auto; } @media (min-width: 640px) { .product-actions { padding: 0 16px 16px 16px; } } .product-actions .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; background: var(--color-primary); color: var(--color-text); border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; } @media (min-width: 640px) { .product-actions .btn { padding: 12px 16px; font-size: 14px; gap: 8px; } } .product-actions .btn:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(252, 177, 216, 0.3); } .product-actions .btn:active { transform: translateY(0); } .product-actions .btn i { font-size: 16px; } @media (min-width: 640px) { .product-actions .btn i { font-size: 18px; } } /* Icon-only buttons on mobile */ @media (max-width: 639px) { .product-actions .btn .btn-text { display: none; } .product-actions .btn { padding: 10px; } } /* ======================================== NAVBAR - MOBILE FIRST ======================================== */ .modern-navbar { position: sticky; top: 0; z-index: 1000; background: var(--color-secondary); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); } .navbar-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; } @media (min-width: 640px) { .navbar-wrapper { height: 68px; padding: 0 24px; } } @media (min-width: 1024px) { .navbar-wrapper { height: 72px; padding: 0 48px; } } /* Logo */ .navbar-brand { flex-shrink: 0; z-index: 10; } .brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; transition: opacity 0.2s; } @media (min-width: 640px) { .brand-link { gap: 16px; } } .brand-logo { width: 40px; height: 40px; object-fit: contain; } @media (min-width: 640px) { .brand-logo { width: 48px; height: 48px; } } @media (min-width: 1024px) { .brand-logo { width: 56px; height: 56px; } } .brand-text { font-size: 20px; font-weight: 700; color: var(--color-text); white-space: nowrap; } @media (min-width: 640px) { .brand-text { font-size: 24px; } } /* Desktop Menu */ .navbar-menu { display: none; flex: 1; justify-content: center; } @media (min-width: 768px) { .navbar-menu { display: flex; } } .nav-links { display: flex; list-style: none; gap: 8px; margin: 0; padding: 0; } @media (min-width: 1024px) { .nav-links { gap: 16px; } } .nav-links a { padding: 8px 16px; color: var(--color-text); text-decoration: none; font-weight: 500; font-size: 14px; border-radius: 6px; transition: all 0.2s; white-space: nowrap; } @media (min-width: 1024px) { .nav-links a { font-size: 15px; padding: 10px 20px; } } .nav-links a:hover, .nav-links a.active { background: rgba(252, 177, 216, 0.2); color: var(--color-text); } /* Navbar Actions */ .navbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; } @media (min-width: 640px) { .navbar-actions { gap: 12px; } } .icon-btn { position: relative; background: transparent; border: none; padding: 8px; color: var(--color-text); font-size: 20px; cursor: pointer; border-radius: 6px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; } @media (min-width: 640px) { .icon-btn { padding: 10px; font-size: 22px; } } .icon-btn:hover { background: rgba(252, 177, 216, 0.2); } .badge { position: absolute; top: 2px; right: 2px; background: var(--color-error); color: white; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 10px; min-width: 18px; text-align: center; } @media (min-width: 640px) { .badge { font-size: 11px; padding: 3px 6px; min-width: 20px; } } /* Mobile Menu Toggle */ .mobile-menu-toggle { display: flex; background: transparent; border: none; padding: 8px; font-size: 24px; color: var(--color-text); cursor: pointer; border-radius: 6px; transition: background 0.2s; } .mobile-menu-toggle:hover { background: rgba(252, 177, 216, 0.2); } @media (min-width: 768px) { .mobile-menu-toggle { display: none; } } /* ======================================== MOBILE MENU SIDEBAR ======================================== */ .mobile-menu { position: fixed; top: 0; left: -100%; width: 85%; max-width: 320px; height: 100vh; height: 100dvh; /* Dynamic viewport height for mobile browsers */ background: var(--color-white); z-index: 9999; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15); -webkit-overflow-scrolling: touch; } .mobile-menu.active { left: 0; } .mobile-menu-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; background: var(--color-white); z-index: 10; } .mobile-menu-close { background: transparent; border: none; font-size: 28px; color: var(--color-text); cursor: pointer; padding: 4px; line-height: 1; } .mobile-menu-nav { padding: 20px 0; } .mobile-menu-nav a { display: block; padding: 16px 24px; color: var(--color-text); text-decoration: none; font-size: 16px; font-weight: 500; transition: background 0.2s; border-left: 3px solid transparent; } .mobile-menu-nav a:hover, .mobile-menu-nav a.active { background: rgba(252, 177, 216, 0.1); border-left-color: var(--color-primary); } .mobile-menu-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 9998; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; -webkit-tap-highlight-color: transparent; } .mobile-menu-overlay.active { opacity: 1; visibility: visible; } /* ======================================== BUTTONS - RESPONSIVE ======================================== */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; font-size: 14px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: all 0.2s; text-decoration: none; line-height: 1.5; white-space: nowrap; -webkit-tap-highlight-color: transparent; } @media (min-width: 640px) { .btn { padding: 12px 24px; font-size: 15px; } } .btn-primary { background: var(--color-primary); color: var(--color-text); } .btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(252, 177, 216, 0.3); } .btn-secondary { background: var(--color-secondary); color: var(--color-text); } .btn-outline { background: transparent; color: var(--color-text); border: 2px solid var(--color-primary); } .btn-outline:hover { background: var(--color-primary); } .btn-small { padding: 8px 16px; font-size: 13px; } .btn-large { padding: 14px 28px; font-size: 16px; } .btn-full { width: 100%; } .btn-icon-only { padding: 10px; aspect-ratio: 1; } /* ======================================== HERO SECTION ======================================== */ .hero-section { padding: 24px 0; text-align: center; } @media (min-width: 640px) { .hero-section { padding: 40px 0; } } @media (min-width: 1024px) { .hero-section { padding: 60px 0; } } .hero-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; margin-bottom: 16px; line-height: 1.2; } .hero-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--color-text-light); margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; } /* ======================================== FILTER & SORT - RESPONSIVE ======================================== */ .filters-container { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; padding: 16px; background: var(--color-white); border-radius: 12px; } @media (min-width: 640px) { .filters-container { flex-direction: row; align-items: center; justify-content: space-between; } } .filter-group { display: flex; flex-wrap: wrap; gap: 8px; } .filter-btn { padding: 8px 16px; background: var(--color-white); border: 2px solid #e5e7eb; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; } .filter-btn:hover, .filter-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-text); } .sort-select { padding: 10px 16px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; background: var(--color-white); cursor: pointer; min-width: 200px; } @media (max-width: 639px) { .sort-select { width: 100%; } } /* ======================================== CART & DROPDOWN - RESPONSIVE ======================================== */ .dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 95vw; max-width: 380px; background: var(--color-white); border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); z-index: 1000; transform-origin: top right; animation: dropdownSlide 0.2s ease; max-height: 85vh; display: flex; flex-direction: column; } @keyframes dropdownSlide { from { opacity: 0; transform: translateY(-10px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } @media (min-width: 640px) { .dropdown { width: 400px; max-height: 80vh; } } .dropdown-header { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; } .dropdown-title { font-size: 18px; font-weight: 700; color: var(--color-text); } .dropdown-body { flex: 1; overflow-y: auto; padding: 12px; max-height: 400px; -webkit-overflow-scrolling: touch; } @media (min-width: 640px) { .dropdown-body { padding: 16px; } } .cart-item, .wishlist-item { display: flex; gap: 12px; padding: 12px; background: #f9fafb; border-radius: 8px; margin-bottom: 12px; } .cart-item-image, .wishlist-item-image { width: 60px; height: 60px; flex-shrink: 0; border-radius: 6px; overflow: hidden; } @media (min-width: 640px) { .cart-item-image, .wishlist-item-image { width: 70px; height: 70px; } } .cart-item-image img, .wishlist-item-image img { width: 100%; height: 100%; object-fit: cover; } .cart-item-info, .wishlist-item-info { flex: 1; min-width: 0; } .cart-item-title, .wishlist-item-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cart-item-price { font-size: 14px; font-weight: 700; color: var(--color-primary); } /* ======================================== FOOTER - RESPONSIVE ======================================== */ footer { background: var(--color-text); color: white; padding: 32px 0 16px; margin-top: 60px; } @media (min-width: 768px) { footer { padding: 48px 0 24px; } } .footer-content { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; } @media (min-width: 640px) { .footer-content { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 768px) { .footer-content { grid-template-columns: repeat(3, 1fr); } } @media (min-width: 1024px) { .footer-content { grid-template-columns: repeat(4, 1fr); } } .footer-section h4 { margin-bottom: 16px; font-size: 16px; font-weight: 600; } .footer-links { list-style: none; padding: 0; margin: 0; } .footer-links a { display: block; color: rgba(255, 255, 255, 0.8); text-decoration: none; padding: 6px 0; font-size: 14px; transition: color 0.2s; } .footer-links a:hover { color: white; } .footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; color: rgba(255, 255, 255, 0.7); } /* ======================================== UTILITY CLASSES ======================================== */ .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .flex { display: flex; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .gap-xs { gap: var(--space-xs); } .gap-sm { gap: var(--space-sm); } .gap-md { gap: var(--space-md); } .gap-lg { gap: var(--space-lg); } .mt-sm { margin-top: var(--space-sm); } .mt-md { margin-top: var(--space-md); } .mt-lg { margin-top: var(--space-lg); } .mb-sm { margin-bottom: var(--space-sm); } .mb-md { margin-bottom: var(--space-md); } .mb-lg { margin-bottom: var(--space-lg); } .p-sm { padding: var(--space-sm); } .p-md { padding: var(--space-md); } .p-lg { padding: var(--space-lg); } .hidden { display: none !important; } .block { display: block !important; } @media (max-width: 639px) { .hidden-mobile { display: none !important; } .visible-mobile { display: block !important; } } @media (min-width: 640px) and (max-width: 767px) { .hidden-tablet { display: none !important; } .visible-tablet { display: block !important; } } @media (min-width: 768px) { .hidden-desktop { display: none !important; } .visible-desktop { display: block !important; } } /* ======================================== ACCESSIBILITY ======================================== */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .skip-link { position: fixed; top: -100px; left: 10px; background: var(--color-accent); color: white; padding: 10px 20px; border-radius: 4px; text-decoration: none; z-index: 10001; transition: top 0.2s; font-weight: 600; } .skip-link:focus { top: 10px; outline: 3px solid white; outline-offset: 2px; } *:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; } /* ======================================== LOADING STATES ======================================== */ .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; gap: 16px; } .spinner { width: 40px; height: 40px; border: 4px solid #f3f4f6; border-top: 4px solid var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-light); } .empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; } /* ======================================== NOTIFICATIONS ======================================== */ .notification-container { position: fixed; top: 80px; right: 16px; z-index: 10000; display: flex; flex-direction: column; gap: 12px; max-width: calc(100vw - 32px); width: 100%; max-width: 400px; pointer-events: none; } .notification { background: var(--color-white); padding: 16px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); display: flex; align-items: center; gap: 12px; pointer-events: auto; animation: slideInRight 0.3s ease; border-left: 4px solid var(--color-success); } @keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } } .notification.success { border-left-color: var(--color-success); } .notification.error { border-left-color: var(--color-error); } .notification.info { border-left-color: var(--color-accent); } /* ======================================== TOUCH IMPROVEMENTS ======================================== */ @media (hover: none) and (pointer: coarse) { /* Better tap targets for touch devices */ button, a, .clickable { min-height: 44px; min-width: 44px; } /* Remove hover effects on touch */ .product-card:hover { transform: none; } /* Improve scrolling */ * { -webkit-overflow-scrolling: touch; } } /* Remove tap highlight on mobile */ * { -webkit-tap-highlight-color: transparent; } /* Smooth scrolling */ html { scroll-behavior: smooth; } /* ======================================== PRINT STYLES ======================================== */ @media print { .modern-navbar, .mobile-menu, .navbar-actions, .mobile-menu-toggle, .notification-container, .dropdown, button, footer { display: none !important; } body { background: white; font-size: 12pt; } .product-card { page-break-inside: avoid; box-shadow: none; border: 1px solid #ddd; } }