/* ===================================================== CLALMOBILE LAYOUT SYSTEM v1.0 Mobile-First Responsive Grid & Containers ===================================================== */ /* ===== BASE RESET ===== */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; } body { min-height: 100vh; font-family: var(--font-ui); font-size: var(--text-base); line-height: var(--leading-normal); color: var(--text-1); background: var(--bg-1); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; } /* ===== MAIN LAYOUT STRUCTURE ===== */ .page-wrapper { display: flex; flex-direction: column; min-height: 100vh; } .main-content { flex: 1; padding-top: var(--header-height); } @media (max-width: 640px) { .main-content { padding-top: calc(var(--header-height) + 6px); } } /* ===== CONTAINER SYSTEM ===== */ .container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-padding); } .container-fluid { width: 100%; padding-inline: var(--container-padding); } .container-narrow { max-width: 720px; } .container-wide { max-width: 1440px; } /* ===== SECTION SPACING ===== */ .section { padding-block: var(--space-8); } .section-sm { padding-block: var(--space-6); } .section-lg { padding-block: var(--space-12); } @media (min-width: 768px) { .section { padding-block: var(--space-12); } .section-lg { padding-block: var(--space-16); } } /* ===== PRODUCT GRID SYSTEM — Premium ===== */ .products-grid { display: grid; gap: 12px; /* Mobile: 2 columns — compact for premium look */ grid-template-columns: repeat(2, 1fr); } /* Mobile grid spacing handled in mobile-premium.css */ @media (min-width: 480px) { .products-grid { gap: 14px; } } @media (min-width: 768px) { .products-grid { gap: 18px; } } @media (min-width: 1024px) { .products-grid { gap: 22px; } } /* Small screens (360px–480px): 2 compact columns */ @media (min-width: 360px) and (max-width: 479px) { .products-grid { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* Small screens (480px+): 2 columns with more space */ @media (min-width: 480px) { .products-grid { grid-template-columns: repeat(2, minmax(165px, 1fr)); } } /* Tablets (768px+): 3 columns */ @media (min-width: 768px) { .products-grid { grid-template-columns: repeat(3, minmax(200px, 1fr)); } } /* Desktop (1024px+): 4 columns */ @media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); } } /* Wide Desktop (1280px+): 5 columns optional */ @media (min-width: 1280px) { .products-grid.grid-5 { grid-template-columns: repeat(5, minmax(200px, 1fr)); } } /* ===== ACCESSORIES GRID (Smaller cards) ===== */ .accessories-grid { display: grid; gap: var(--grid-gap-sm); grid-template-columns: repeat(2, 1fr); } @media (min-width: 480px) { .accessories-grid { gap: var(--grid-gap); grid-template-columns: repeat(2, minmax(160px, 1fr)); } } @media (min-width: 768px) { .accessories-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); } } @media (min-width: 1024px) { .accessories-grid { grid-template-columns: repeat(4, minmax(200px, 1fr)); } } @media (min-width: 1280px) { .accessories-grid { grid-template-columns: repeat(5, minmax(180px, 1fr)); } } /* ===== FLEX UTILITIES ===== */ .flex { display: flex; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .justify-end { justify-content: flex-end; } .gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); } .gap-5 { gap: var(--space-5); } .gap-6 { gap: var(--space-6); } .gap-8 { gap: var(--space-8); } /* ===== CATALOG LAYOUT (With Sidebar Filters) ===== */ .catalog-layout { display: flex; flex-direction: column; gap: var(--space-6); } /* Desktop: Side filters */ @media (min-width: 1024px) { .catalog-layout { flex-direction: row; align-items: flex-start; } .catalog-sidebar { position: sticky; top: calc(var(--header-height) + var(--space-4)); width: 280px; flex-shrink: 0; max-height: calc(100vh - var(--header-height) - var(--space-8)); overflow-y: auto; } .catalog-main { flex: 1; min-width: 0; /* Prevent overflow */ } } /* ===== TWO COLUMN LAYOUT ===== */ .two-col-layout { display: grid; gap: var(--space-6); grid-template-columns: 1fr; } @media (min-width: 768px) { .two-col-layout { grid-template-columns: 1fr 1fr; } } /* ===== CHECKOUT LAYOUT ===== */ .checkout-layout { display: grid; gap: var(--space-6); grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } @media (min-width: 1024px) { .checkout-layout { max-width: none; grid-template-columns: 1fr 400px; } .checkout-layout.reversed { grid-template-columns: 400px 1fr; } } /* ===== STICKY ELEMENTS ===== */ .sticky-top { position: sticky; top: 0; z-index: var(--z-sticky); } .sticky-bottom { position: sticky; bottom: 0; z-index: var(--z-sticky); } /* ===== HIDE/SHOW UTILITIES ===== */ .hide-mobile { display: none !important; } .show-mobile { display: flex !important; } @media (min-width: 768px) { .hide-mobile { display: flex !important; } .show-mobile-only { display: none !important; } } @media (min-width: 1024px) { .hide-desktop { display: none !important; } .show-desktop { display: flex !important; } } /* ===== ASPECT RATIOS ===== */ .aspect-square { aspect-ratio: 1 / 1; } .aspect-video { aspect-ratio: 16 / 9; } .aspect-portrait { aspect-ratio: 3 / 4; } /* ===== IMAGE CONTAINERS ===== */ .img-container { position: relative; overflow: hidden; background: var(--bg-3); } .img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-normal) var(--ease-out); } .img-container:hover img { transform: scale(1.05); } /* ===== SCROLLBAR STYLING ===== */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: var(--bg-2); } ::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: var(--r-full); } ::-webkit-scrollbar-thumb:hover { background: var(--muted-2); } /* Firefox */ * { scrollbar-width: thin; scrollbar-color: var(--bg-3) var(--bg-2); } /* ===== SAFE AREA PADDING (for notched phones) ===== */ @supports (padding: env(safe-area-inset-bottom)) { .safe-bottom { padding-bottom: env(safe-area-inset-bottom); } .safe-top { padding-top: env(safe-area-inset-top); } } /* ===== NO OVERFLOW ===== */ .overflow-hidden { overflow: hidden; } .overflow-x-hidden { overflow-x: hidden; } /* Prevent any horizontal scroll on page */ html, body { overflow-x: hidden; max-width: 100vw; }