Spaces:
Running
Running
| /* fedus-style.css | |
| Modern responsive CSS for an electronics e-commerce site (FEDUS) | |
| Save as fedus-style.css and include in your HTML. | |
| Customize :root variables to change brand colors / fonts quickly. | |
| */ | |
| /* ------------------------- | |
| VARIABLES & BASE SETUP | |
| ------------------------- */ | |
| :root{ | |
| --brand-primary: #0a4b8c; /* FEDUS blue — change as needed */ | |
| --brand-accent: #ff6b00; /* accent / CTA */ | |
| --muted: #6b7280; | |
| --bg: #ffffff; | |
| --surface: #f8fafc; | |
| --card: #ffffff; | |
| --text: #0f172a; | |
| --radius-sm: 6px; | |
| --radius-md: 12px; | |
| --shadow-sm: 0 1px 3px rgba(15,23,42,0.06); | |
| --shadow-md: 0 6px 18px rgba(15,23,42,0.08); | |
| --container-width: 1200px; | |
| --max-width-narrow: 980px; | |
| --transition-fast: 180ms; | |
| --transition-medium: 300ms; | |
| --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; | |
| --focus-ring: 3px solid rgba(10,75,140,0.14); | |
| --sale-red: #dc2626; | |
| } | |
| /* Dark mode optional */ | |
| [data-theme="dark"]{ | |
| --bg: #0b1220; | |
| --surface: #081021; | |
| --card: #071022; | |
| --text: #e6eef8; | |
| --muted: #9aa6bf; | |
| --shadow-sm: none; | |
| --shadow-md: none; | |
| } | |
| /* Reset & base */ | |
| *{box-sizing: border-box} | |
| html,body{height:100%} | |
| body{ | |
| margin:0; | |
| font-family:var(--font-sans); | |
| background:var(--bg); | |
| color:var(--text); | |
| -webkit-font-smoothing:antialiased; | |
| -moz-osx-font-smoothing:grayscale; | |
| line-height:1.45; | |
| font-size:16px; | |
| } | |
| /* Container */ | |
| .container{ | |
| width:100%; | |
| max-width:var(--container-width); | |
| margin:0 auto; | |
| padding:0 20px; | |
| } | |
| /* Utility helpers */ | |
| .hidden{display:none} | |
| .text-center{text-align:center} | |
| .flex{display:flex} | |
| .items-center{align-items:center} | |
| .justify-between{justify-content:space-between} | |
| .column{flex-direction:column} | |
| .row{flex-direction:row} | |
| .mr-8{margin-right:8px} | |
| .mt-8{margin-top:8px} | |
| .mb-16{margin-bottom:16px} | |
| /* ------------------------- | |
| TYPOGRAPHY | |
| ------------------------- */ | |
| .h1{font-size:clamp(1.6rem, 2.8vw, 2.4rem); font-weight:700; margin:0 0 .6rem} | |
| .h2{font-size:1.25rem; font-weight:700; margin:0 0 .5rem} | |
| .lead{font-size:1rem; color:var(--muted)} | |
| .small{font-size:.9rem; color:var(--muted)} | |
| a{color:var(--brand-primary); text-decoration:none} | |
| a:hover{text-decoration:underline} | |
| /* ------------------------- | |
| SITE HEADER / NAVBAR | |
| ------------------------- */ | |
| .site-header{ | |
| background:linear-gradient(180deg, rgba(255,255,255,0.6), transparent); | |
| position:sticky; | |
| top:0; | |
| z-index:100; | |
| backdrop-filter: blur(6px); | |
| border-bottom:1px solid rgba(15,23,42,0.04); | |
| } | |
| .site-header .header-inner{ | |
| display:flex; | |
| align-items:center; | |
| justify-content:space-between; | |
| padding:12px 20px; | |
| max-width:var(--container-width); | |
| margin:0 auto; | |
| } | |
| .brand{ | |
| display:flex; | |
| align-items:center; | |
| gap:12px; | |
| } | |
| .brand-logo{ | |
| width:44px; | |
| height:44px; | |
| border-radius:8px; | |
| background:linear-gradient(135deg,var(--brand-primary),#0d6fb3); | |
| display:inline-flex; | |
| align-items:center; | |
| justify-content:center; | |
| color:white; | |
| font-weight:700; | |
| box-shadow:var(--shadow-sm); | |
| } | |
| .brand-name{font-weight:700; letter-spacing:.2px} | |
| /* Search */ | |
| .header-search{ | |
| flex:1; | |
| max-width:560px; | |
| margin:0 18px; | |
| display:flex; | |
| gap:8px; | |
| } | |
| .header-search input[type="search"]{ | |
| width:100%; | |
| padding:10px 14px; | |
| border-radius:10px; | |
| border:1px solid rgba(15,23,42,0.08); | |
| background:var(--card); | |
| transition:box-shadow var(--transition-fast); | |
| } | |
| .header-search input[type="search"]:focus{ | |
| outline:none; | |
| box-shadow:var(--focus-ring); | |
| border-color:var(--brand-primary); | |
| } | |
| /* Header actions */ | |
| .header-actions{display:flex; gap:8px; align-items:center} | |
| .icon-btn{ | |
| display:inline-flex; | |
| align-items:center; | |
| justify-content:center; | |
| padding:8px 10px; | |
| border-radius:8px; | |
| background:transparent; | |
| border:1px solid rgba(15,23,42,0.05); | |
| transition:all var(--transition-fast); | |
| } | |
| .icon-btn:hover{transform:translateY(-2px); box-shadow:var(--shadow-sm)} | |
| .cart-badge{ | |
| background:var(--brand-accent); | |
| color:white; | |
| font-weight:600; | |
| padding:3px 7px; | |
| border-radius:999px; | |
| font-size:.8rem; | |
| margin-left:6px; | |
| } | |
| /* Main navigation */ | |
| .main-nav{display:flex; gap:12px; align-items:center; padding:8px 0} | |
| .main-nav a{padding:8px 10px; border-radius:8px; color:var(--muted); font-weight:600} | |
| .main-nav a:hover{background:rgba(10,75,140,0.06); color:var(--brand-primary)} | |
| /* ------------------------- | |
| HERO / BANNER | |
| ------------------------- */ | |
| .hero{ | |
| display:grid; | |
| grid-template-columns: 1fr 480px; | |
| gap:24px; | |
| align-items:center; | |
| padding:28px 0; | |
| } | |
| .hero .hero-card{ | |
| background:linear-gradient(180deg,var(--surface),transparent); | |
| padding:24px; | |
| border-radius:var(--radius-md); | |
| box-shadow:var(--shadow-md); | |
| } | |
| .hero .cta{ | |
| display:inline-flex; | |
| align-items:center; | |
| gap:10px; | |
| background:var(--brand-primary); | |
| color:white; | |
| padding:12px 16px; | |
| border-radius:10px; | |
| font-weight:700; | |
| border:none; | |
| cursor:pointer; | |
| transition:transform var(--transition-fast); | |
| } | |
| .hero .cta:hover{transform:translateY(-3px)} | |
| /* ------------------------- | |
| LAYOUT: SIDEBAR + PRODUCT GRID | |
| ------------------------- */ | |
| .shop-layout{ | |
| display:grid; | |
| grid-template-columns: 260px 1fr; | |
| gap:20px; | |
| margin-top:20px; | |
| } | |
| /* Sidebar filters */ | |
| .sidebar{ | |
| background:var(--card); | |
| padding:16px; | |
| border-radius:12px; | |
| border:1px solid rgba(15,23,42,0.04); | |
| position:sticky; | |
| top:88px; | |
| height:fit-content; | |
| } | |
| .filter-group{margin-bottom:16px} | |
| .filter-group h4{margin:0 0 8px; font-size:.95rem; color:var(--muted)} | |
| .checkbox-row{display:flex; gap:8px; align-items:center; margin-bottom:8px} | |
| .checkbox-row input[type="checkbox"]{width:16px; height:16px} | |
| /* Product grid */ | |
| .product-grid{ | |
| display:grid; | |
| grid-template-columns: repeat(4, 1fr); | |
| gap:18px; | |
| align-items:start; | |
| } | |
| @media (max-width:1100px){ | |
| .product-grid{grid-template-columns: repeat(3, 1fr)} | |
| } | |
| @media (max-width:780px){ | |
| .hero{grid-template-columns:1fr} | |
| .shop-layout{grid-template-columns:1fr} | |
| .product-grid{grid-template-columns: repeat(2, 1fr)} | |
| .header-search{display:none} | |
| } | |
| @media (max-width:480px){ | |
| .product-grid{grid-template-columns:1fr} | |
| } | |
| /* ------------------------- | |
| PRODUCT CARD | |
| ------------------------- */ | |
| .product-card{ | |
| background:var(--card); | |
| border-radius:12px; | |
| overflow:hidden; | |
| border:1px solid rgba(15,23,42,0.04); | |
| transition:transform var(--transition-fast), box-shadow var(--transition-fast); | |
| display:flex; | |
| flex-direction:column; | |
| } | |
| .product-card:hover{transform:translateY(-6px); box-shadow:var(--shadow-md)} | |
| .product-media{ | |
| background:linear-gradient(180deg, rgba(15,23,42,0.03), transparent); | |
| padding:16px; | |
| display:flex; | |
| align-items:center; | |
| justify-content:center; | |
| min-height:150px; | |
| } | |
| .product-media img{max-width:100%; max-height:160px; object-fit:contain} | |
| .product-body{padding:12px 14px; display:flex; flex-direction:column; gap:8px; flex:1} | |
| .product-title{font-weight:700; font-size:.98rem} | |
| .product-desc{font-size:.9rem; color:var(--muted); min-height:38px} | |
| .product-meta{display:flex; align-items:center; justify-content:space-between; gap:8px} | |
| .price{font-weight:800; font-size:1rem} | |
| .price .old{font-weight:600; text-decoration:line-through; color:var(--muted); font-size:.9rem; margin-left:8px} | |
| .add-to-cart{ | |
| display:inline-flex; | |
| align-items:center; | |
| justify-content:center; | |
| gap:8px; | |
| background:var(--brand-accent); | |
| color:white; | |
| border:none; | |
| padding:10px 12px; | |
| border-radius:8px; | |
| cursor:pointer; | |
| font-weight:700; | |
| transition:opacity var(--transition-fast), transform var(--transition-fast); | |
| } | |
| .add-to-cart:active{transform:scale(.99)} | |
| .badge{ | |
| display:inline-block; | |
| padding:6px 8px; | |
| border-radius:8px; | |
| background:rgba(10,75,140,0.08); | |
| color:var(--brand-primary); | |
| font-weight:700; | |
| font-size:.75rem; | |
| } | |
| /* ------------------------- | |
| PRODUCT LIST / DETAIL | |
| ------------------------- */ | |
| .product-detail{ | |
| display:grid; | |
| grid-template-columns: 420px 1fr; | |
| gap:20px; | |
| margin-top:18px; | |
| } | |
| .product-gallery{background:var(--card); padding:16px; border-radius:12px} | |
| .product-info h1{margin-top:0} | |
| .specs-table{width:100%; border-collapse:collapse; margin-top:12px} | |
| .specs-table th, .specs-table td{padding:8px; border-bottom:1px solid rgba(15,23,42,0.04); text-align:left} | |
| .specs-table th{color:var(--muted); font-weight:600; width:200px} | |
| /* ------------------------- | |
| FORMS & INPUTS | |
| ------------------------- */ | |
| input[type="text"], input[type="email"], input[type="number"], textarea, select{ | |
| width:100%; | |
| padding:10px 12px; | |
| border-radius:10px; | |
| border:1px solid rgba(15,23,42,0.08); | |
| background:var(--card); | |
| transition:box-shadow var(--transition-fast); | |
| font-size:1rem; | |
| } | |
| input:focus, textarea:focus, select:focus{outline:none; box-shadow:var(--focus-ring)} | |
| /* Buttons */ | |
| .btn{ | |
| display:inline-flex; | |
| align-items:center; | |
| gap:8px; | |
| padding:10px 14px; | |
| border-radius:10px; | |
| border:none; | |
| cursor:pointer; | |
| font-weight:700; | |
| } | |
| .btn-primary{background:var(--brand-primary); color:white} | |
| .btn-outline{background:transparent; border:1px solid rgba(15,23,42,0.08); color:var(--text)} | |
| .form-row{display:grid; grid-template-columns:1fr 1fr; gap:12px} | |
| @media (max-width:600px){ .form-row{grid-template-columns:1fr} } | |
| /* ------------------------- | |
| NOTIFICATIONS / MESSAGES | |
| ------------------------- */ | |
| .alert{ | |
| padding:12px 16px; | |
| border-radius:10px; | |
| margin-bottom:12px; | |
| background:linear-gradient(180deg, rgba(10,75,140,0.04), transparent); | |
| border:1px solid rgba(10,75,140,0.06); | |
| } | |
| /* ------------------------- | |
| FOOTER | |
| ------------------------- */ | |
| .site-footer{ | |
| margin-top:36px; | |
| border-top:1px solid rgba(15,23,42,0.04); | |
| padding:24px 0; | |
| background:var(--surface); | |
| } | |
| .site-footer .footer-inner{display:flex; gap:20px; justify-content:space-between; align-items:flex-start; max-width:var(--container-width); margin:0 auto; padding:0 20px} | |
| .footer-col{flex:1; min-width:180px} | |
| .footer-col h4{margin-top:0} | |
| .footer-links a{display:block; margin-bottom:8px; color:var(--muted)} | |
| /* ------------------------- | |
| SMALL UI ELEMENTS | |
| ------------------------- */ | |
| .pill{display:inline-block; padding:6px 10px; border-radius:999px; background:rgba(0,0,0,0.04); font-weight:600} | |
| .kicker{font-size:.78rem; color:var(--muted); text-transform:uppercase; letter-spacing:1px} | |
| /* TAG / FILTER BADGE */ | |
| .tag{display:inline-flex; gap:8px; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(15,23,42,0.04); color:var(--muted); font-weight:700} | |
| /* ------------------------- | |
| MODAL | |
| ------------------------- */ | |
| .modal-backdrop{ | |
| position:fixed; inset:0; background:rgba(2,6,23,0.56); display:flex; align-items:center; justify-content:center; z-index:200; | |
| } | |
| .modal{ | |
| width:100%; | |
| max-width:720px; | |
| background:var(--card); | |
| border-radius:12px; | |
| padding:18px; | |
| box-shadow:var(--shadow-md); | |
| } | |
| /* ------------------------- | |
| LOADING SKELETONS | |
| ------------------------- */ | |
| .skeleton{ | |
| background:linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02), rgba(0,0,0,0.06)); | |
| background-size:200% 100%; | |
| animation: shimmer 1.6s linear infinite; | |
| border-radius:8px; | |
| } | |
| @keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}} | |
| /* ------------------------- | |
| TABLES | |
| ------------------------- */ | |
| .table{width:100%; border-collapse:collapse} | |
| .table th, .table td{padding:12px 10px; border-bottom:1px solid rgba(15,23,42,0.04); text-align:left} | |
| .table th{background:transparent; color:var(--muted)} | |
| /* ------------------------- | |
| RESPONSIVE HELPERS | |
| ------------------------- */ | |
| @media (max-width:900px){ | |
| .brand-name{display:none} | |
| .site-header .header-inner{padding:10px} | |
| } | |
| /* ------------------------- | |
| SMALL STATES | |
| ------------------------- */ | |
| .is-out-of-stock{opacity:.6; pointer-events:none} | |
| .sale-badge{background:var(--sale-red); color:white; padding:4px 8px; border-radius:8px; font-weight:800} | |
| /* ------------------------- | |
| PRINT STYLES | |
| ------------------------- */ | |
| @media print{ | |
| body{background:white; color:black} | |
| .site-header, .site-footer, .sidebar, .header-search, .header-actions{display:none} | |
| .container{padding:0} | |
| } | |
| /* ------------------------- | |
| ACCESSIBILITY | |
| ------------------------- */ | |
| a:focus, button:focus, input:focus{outline:none; box-shadow:var(--focus-ring)} | |
| /* End of fedus-style.css */ | |