/* =============================================================================
AFFILIATE PRODUCT AGGREGATOR - MAIN STYLESHEET
Author: MiniMax Agent
Description: Clean, responsive CSS for affiliate product aggregator website
============================================================================= */
/* =============================================================================
CSS RESET & BASE STYLES
============================================================================= */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
scroll-behavior: smooth;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #333;
background-color: #fff;
}
img {
max-width: 100%;
height: auto;
display: block;
}
a {
text-decoration: none;
color: inherit;
transition: all 0.3s ease;
}
button {
cursor: pointer;
border: none;
background: none;
font-family: inherit;
transition: all 0.3s ease;
}
/* =============================================================================
TYPOGRAPHY
============================================================================= */
h1, h2, h3, h4, h5, h6 {
font-weight: 700;
line-height: 1.2;
margin-bottom: 1rem;
color: #1a1a1a;
}
h1 {
font-size: clamp(2rem, 5vw, 3rem);
}
h2 {
font-size: clamp(1.5rem, 4vw, 2.25rem);
}
h3 {
font-size: clamp(1.25rem, 3vw, 1.75rem);
}
p {
margin-bottom: 1rem;
color: #555;
}
.text-center {
text-align: center;
}
.text-small {
font-size: 0.875rem;
}
/* =============================================================================
LAYOUT COMPONENTS
============================================================================= */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
.section {
padding: 3rem 0;
}
.section-header {
text-align: center;
margin-bottom: 3rem;
}
.section-subtitle {
font-size: 1.125rem;
color: #666;
margin-top: 0.5rem;
}
/* Grid System */
.grid {
display: grid;
gap: 1.5rem;
}
.grid-2 {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-3 {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.grid-4 {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid-6 {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
/* Flexbox utilities */
.flex {
display: flex;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-wrap {
flex-wrap: wrap;
}
/* =============================================================================
HEADER & NAVIGATION
============================================================================= */
.header {
background: #fff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 1000;
}
.header-top {
padding: 0.5rem 0;
background: #f8f9fa;
border-bottom: 1px solid #e9ecef;
}
.header-top .container {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
}
.header-main {
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: 800;
color: #2563eb;
}
.nav {
display: flex;
list-style: none;
gap: 2rem;
}
.nav a {
font-weight: 500;
padding: 0.5rem 0;
position: relative;
}
.nav a:hover,
.nav a.active {
color: #2563eb;
}
.nav a.active::after {
content: '';
position: absolute;
bottom: -0.5rem;
left: 0;
width: 100%;
height: 2px;
background: #2563eb;
}
.mobile-menu-toggle {
display: none;
flex-direction: column;
gap: 4px;
padding: 8px;
}
.mobile-menu-toggle span {
width: 25px;
height: 3px;
background: #333;
transition: 0.3s;
}
/* =============================================================================
HERO SECTION
============================================================================= */
.hero {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 4rem 0;
text-align: center;
}
.hero h1 {
color: white;
margin-bottom: 1rem;
}
.hero p {
font-size: 1.25rem;
margin-bottom: 2rem;
color: rgba(255, 255, 255, 0.9);
}
.hero-search {
max-width: 500px;
margin: 0 auto;
position: relative;
}
.search-form {
display: flex;
background: white;
border-radius: 50px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.search-input {
flex: 1;
padding: 1rem 1.5rem;
border: none;
font-size: 1rem;
outline: none;
}
.search-btn {
background: #2563eb;
color: white;
padding: 1rem 2rem;
font-weight: 600;
border-radius: 0 50px 50px 0;
}
.search-btn:hover {
background: #1d4ed8;
}
/* =============================================================================
BREADCRUMBS
============================================================================= */
.breadcrumbs {
background: #f8f9fa;
padding: 1rem 0;
margin-bottom: 2rem;
}
.breadcrumbs-list {
display: flex;
list-style: none;
gap: 0.5rem;
flex-wrap: wrap;
}
.breadcrumbs-list li {
display: flex;
align-items: center;
}
.breadcrumbs-list li:not(:last-child)::after {
content: '/';
margin-left: 0.5rem;
color: #666;
}
.breadcrumbs a {
color: #2563eb;
text-decoration: none;
}
.breadcrumbs a:hover {
text-decoration: underline;
}
.breadcrumbs .current {
color: #666;
}
/* =============================================================================
PRODUCT CARDS & GRID
============================================================================= */
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.product-card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
overflow: hidden;
transition: all 0.3s ease;
position: relative;
}
.product-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.product-image {
position: relative;
overflow: hidden;
aspect-ratio: 16/10;
}
.product-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
transform: scale(1.05);
}
.product-badge {
position: absolute;
top: 1rem;
left: 1rem;
background: #dc2626;
color: white;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
}
.product-content {
padding: 1.5rem;
}
.product-title {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 0.5rem;
line-height: 1.3;
}
.product-title a {
color: #1a1a1a;
}
.product-title a:hover {
color: #2563eb;
}
.product-description {
color: #666;
font-size: 0.9rem;
margin-bottom: 1rem;
line-height: 1.4;
}
.product-price {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
.price-current {
font-size: 1.25rem;
font-weight: 700;
color: #059669;
}
.price-original {
font-size: 1rem;
color: #666;
text-decoration: line-through;
}
.price-discount {
background: #fee2e2;
color: #dc2626;
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
}
.product-rating {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
.stars {
color: #fbbf24;
}
.rating-count {
color: #666;
font-size: 0.875rem;
}
.product-actions {
display: flex;
gap: 0.5rem;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s ease;
font-size: 0.9rem;
}
.btn-primary {
background: #2563eb;
color: white;
flex: 1;
}
.btn-primary:hover {
background: #1d4ed8;
transform: translateY(-1px);
}
.btn-secondary {
background: #f3f4f6;
color: #374151;
padding: 0.75rem;
}
.btn-secondary:hover {
background: #e5e7eb;
}
/* =============================================================================
CATEGORY LIST
============================================================================= */
.category-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.category-card {
background: white;
border-radius: 12px;
padding: 2rem 1.5rem;
text-align: center;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease;
border: 2px solid transparent;
}
.category-card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
border-color: #2563eb;
}
.category-icon {
font-size: 3rem;
margin-bottom: 1rem;
display: block;
}
.category-title {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: #1a1a1a;
}
.category-count {
color: #666;
font-size: 0.875rem;
}
/* =============================================================================
PRODUCT DETAIL PAGE
============================================================================= */
.product-detail {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
margin: 2rem 0;
}
.product-detail-image {
position: sticky;
top: 2rem;
}
.product-detail-content h1 {
margin-bottom: 1rem;
}
.product-detail-meta {
display: flex;
gap: 2rem;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid #e5e7eb;
}
.product-detail-description {
margin: 2rem 0;
line-height: 1.6;
}
.product-specs {
background: #f8f9fa;
padding: 2rem;
border-radius: 12px;
margin: 2rem 0;
}
.specs-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.spec-item {
display: flex;
justify-content: space-between;
padding: 0.5rem 0;
border-bottom: 1px solid #e5e7eb;
}
.spec-label {
font-weight: 600;
color: #374151;
}
.spec-value {
color: #666;
}
.product-purchase {
background: white;
border: 2px solid #e5e7eb;
border-radius: 12px;
padding: 2rem;
position: sticky;
top: 2rem;
}
.purchase-price {
text-align: center;
margin-bottom: 2rem;
}
.purchase-price .price-current {
font-size: 2rem;
color: #059669;
}
.purchase-price .price-original {
font-size: 1.25rem;
}
.purchase-btn {
width: 100%;
padding: 1rem;
background: #059669;
color: white;
border-radius: 8px;
font-weight: 600;
font-size: 1.125rem;
margin-bottom: 1rem;
}
.purchase-btn:hover {
background: #047857;
}
.purchase-guarantee {
text-align: center;
color: #666;
font-size: 0.875rem;
}
/* =============================================================================
FORMS
============================================================================= */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
color: #374151;
}
.form-input {
width: 100%;
padding: 0.75rem 1rem;
border: 2px solid #e5e7eb;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
}
.form-input:focus {
outline: none;
border-color: #2563eb;
}
.form-textarea {
resize: vertical;
min-height: 120px;
}
/* =============================================================================
FOOTER
============================================================================= */
.footer {
background: #1f2937;
color: white;
padding: 3rem 0 1rem;
margin-top: 4rem;
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.footer-section h3 {
color: white;
margin-bottom: 1rem;
}
.footer-section p,
.footer-section li {
color: #d1d5db;
margin-bottom: 0.5rem;
}
.footer-section ul {
list-style: none;
}
.footer-section a {
color: #d1d5db;
}
.footer-section a:hover {
color: white;
}
.footer-bottom {
border-top: 1px solid #374151;
padding-top: 1rem;
text-align: center;
color: #9ca3af;
}
/* =============================================================================
UTILITIES
============================================================================= */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }
.hidden {
display: none;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* =============================================================================
RESPONSIVE DESIGN
============================================================================= */
@media (max-width: 768px) {
.container {
padding: 0 0.75rem;
}
.nav {
display: none;
}
.mobile-menu-toggle {
display: flex;
}
.hero {
padding: 2rem 0;
}
.hero h1 {
font-size: 2rem;
}
.search-form {
flex-direction: column;
border-radius: 12px;
}
.search-btn {
border-radius: 0 0 12px 12px;
}
.product-grid {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.category-grid {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.product-detail {
grid-template-columns: 1fr;
gap: 2rem;
}
.product-detail-image {
position: static;
}
.product-purchase {
position: static;
}
.product-detail-meta {
flex-direction: column;
gap: 1rem;
}
.section {
padding: 2rem 0;
}
.footer-content {
grid-template-columns: 1fr;
text-align: center;
}
}
@media (max-width: 480px) {
.product-grid {
grid-template-columns: 1fr;
}
.category-grid {
grid-template-columns: 1fr;
}
.specs-grid {
grid-template-columns: 1fr;
}
.product-actions {
flex-direction: column;
}
.btn {
width: 100%;
justify-content: center;
}
}
/* =============================================================================
LOADING & ANIMATIONS
============================================================================= */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: fadeIn 0.6s ease-out;
}
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #fff;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* =============================================================================
ACCESSIBILITY
============================================================================= */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
html {
scroll-behavior: auto;
}
}
/* Focus styles for keyboard navigation */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
outline: 2px solid #2563eb;
outline-offset: 2px;
}
/* High contrast mode support */
@media (prefers-contrast: high) {
.product-card,
.category-card,
.product-purchase {
border: 2px solid #000;
}
}