|
| 1 | +import { Link } from "react-router-dom"; |
| 2 | +import { motion } from "framer-motion"; |
| 3 | +import { Badge } from "@/components/ui/badge"; |
| 4 | +import { Stethoscope } from "lucide-react"; |
| 5 | + |
| 6 | +/** |
| 7 | + * Priority dermocosmetic brands — each square links to /shop?brand=<name> |
| 8 | + */ |
| 9 | + |
| 10 | +const DERMO_BRANDS = [ |
| 11 | + { |
| 12 | + name: "Eucerin", |
| 13 | + slug: "Eucerin", |
| 14 | + color: "from-[hsl(210,60%,95%)] to-[hsl(210,50%,88%)]", |
| 15 | + accent: "hsl(210,60%,40%)", |
| 16 | + initials: "Eu", |
| 17 | + }, |
| 18 | + { |
| 19 | + name: "La Roche-Posay", |
| 20 | + slug: "La Roche-Posay", |
| 21 | + color: "from-[hsl(200,40%,94%)] to-[hsl(200,35%,86%)]", |
| 22 | + accent: "hsl(200,50%,35%)", |
| 23 | + initials: "LRP", |
| 24 | + }, |
| 25 | + { |
| 26 | + name: "CeraVe", |
| 27 | + slug: "CeraVe", |
| 28 | + color: "from-[hsl(195,45%,93%)] to-[hsl(195,40%,85%)]", |
| 29 | + accent: "hsl(195,55%,35%)", |
| 30 | + initials: "CV", |
| 31 | + }, |
| 32 | + { |
| 33 | + name: "Bioderma", |
| 34 | + slug: "Bioderma", |
| 35 | + color: "from-[hsl(340,40%,95%)] to-[hsl(340,35%,88%)]", |
| 36 | + accent: "hsl(340,50%,40%)", |
| 37 | + initials: "Bd", |
| 38 | + }, |
| 39 | + { |
| 40 | + name: "Vichy", |
| 41 | + slug: "Vichy", |
| 42 | + color: "from-[hsl(160,35%,93%)] to-[hsl(160,30%,85%)]", |
| 43 | + accent: "hsl(160,45%,30%)", |
| 44 | + initials: "Vi", |
| 45 | + }, |
| 46 | + { |
| 47 | + name: "Sesderma", |
| 48 | + slug: "Sesderma", |
| 49 | + color: "from-[hsl(35,50%,94%)] to-[hsl(35,45%,86%)]", |
| 50 | + accent: "hsl(35,55%,35%)", |
| 51 | + initials: "Sd", |
| 52 | + }, |
| 53 | + { |
| 54 | + name: "COSRX", |
| 55 | + slug: "COSRX", |
| 56 | + color: "from-[hsl(0,0%,95%)] to-[hsl(0,0%,88%)]", |
| 57 | + accent: "hsl(0,0%,25%)", |
| 58 | + initials: "CX", |
| 59 | + }, |
| 60 | +]; |
| 61 | + |
| 62 | +export default function DermoBrands() { |
| 63 | + return ( |
| 64 | + <section className="py-16 sm:py-20 bg-background"> |
| 65 | + <div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"> |
| 66 | + {/* Header */} |
| 67 | + <div className="text-center mb-10"> |
| 68 | + <Badge |
| 69 | + variant="outline" |
| 70 | + className="mb-4 border-accent text-accent font-body text-xs tracking-[0.2em] px-4 py-1.5" |
| 71 | + > |
| 72 | + <Stethoscope className="h-3 w-3 mr-2" /> |
| 73 | + DERMOCOSMETICS |
| 74 | + </Badge> |
| 75 | + <h2 className="font-heading text-2xl sm:text-3xl lg:text-4xl font-bold text-foreground"> |
| 76 | + Trusted <span className="text-primary">Clinical Brands</span> |
| 77 | + </h2> |
| 78 | + <p className="mt-3 text-muted-foreground text-sm sm:text-base max-w-xl mx-auto font-body"> |
| 79 | + Pharmacist-approved dermocosmetic brands — tap to explore. |
| 80 | + </p> |
| 81 | + </div> |
| 82 | + |
| 83 | + {/* Brand Grid */} |
| 84 | + <div className="grid grid-cols-3 sm:grid-cols-4 lg:grid-cols-7 gap-4"> |
| 85 | + {DERMO_BRANDS.map((brand, i) => ( |
| 86 | + <motion.div |
| 87 | + key={brand.slug} |
| 88 | + initial={{ opacity: 0, y: 16 }} |
| 89 | + whileInView={{ opacity: 1, y: 0 }} |
| 90 | + viewport={{ once: true }} |
| 91 | + transition={{ delay: i * 0.06, duration: 0.4 }} |
| 92 | + > |
| 93 | + <Link |
| 94 | + to={`/shop?brand=${encodeURIComponent(brand.slug)}`} |
| 95 | + className="group flex flex-col items-center gap-3" |
| 96 | + > |
| 97 | + {/* Square icon */} |
| 98 | + <div |
| 99 | + className={`relative w-full aspect-square rounded-2xl bg-gradient-to-br ${brand.color} border border-border/60 group-hover:border-accent/50 group-hover:shadow-[0_4px_20px_hsl(var(--accent)/0.15)] transition-all duration-300 flex items-center justify-center overflow-hidden`} |
| 100 | + > |
| 101 | + {/* Brand initials as elegant monogram */} |
| 102 | + <span |
| 103 | + className="text-2xl sm:text-3xl lg:text-4xl font-heading font-bold tracking-tight transition-transform duration-300 group-hover:scale-110" |
| 104 | + style={{ color: brand.accent }} |
| 105 | + > |
| 106 | + {brand.initials} |
| 107 | + </span> |
| 108 | + |
| 109 | + {/* Subtle shine on hover */} |
| 110 | + <div className="absolute inset-0 bg-gradient-to-tr from-transparent via-white/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none" /> |
| 111 | + </div> |
| 112 | + |
| 113 | + {/* Brand name */} |
| 114 | + <span className="text-xs sm:text-sm font-body font-medium text-muted-foreground group-hover:text-foreground transition-colors text-center leading-tight"> |
| 115 | + {brand.name} |
| 116 | + </span> |
| 117 | + </Link> |
| 118 | + </motion.div> |
| 119 | + ))} |
| 120 | + </div> |
| 121 | + </div> |
| 122 | + </section> |
| 123 | + ); |
| 124 | +} |
0 commit comments