@davoodmehraban89 / medusa / commits / 7284ae0a
Fork 0

style(preview): polished responsive RTL/LTR commerce concept with interactive product cards

davoodmehraban89 committed Oct 15, 2026 at 01:27 UTC 7284ae0a154df401ceac823e5322e76d171ebdef
1 file changed +219 -3
commerce/src/styles.css
+219 -3
@@ -1,3 +1,219 @@
1 -:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;color:#182126;background:#f7f8f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}.header{display:flex;align-items:center;justify-content:space-between;padding:22px clamp(20px,6vw,90px);background:#fff;gap:20px}.logo{font-size:21px;font-weight:800;letter-spacing:.03em}.logo span{font-size:11px;font-weight:500;letter-spacing:.12em}.header nav{display:flex;gap:14px;flex-wrap:wrap}.header label{font-size:12px;color:#52635d}select{display:block;min-width:105px;margin-top:6px;border:1px solid #d9dfda;border-radius:9px;padding:9px;background:#fff;color:#182126}.hero{padding:clamp(65px,11vw,150px) clamp(20px,9vw,140px);background:linear-gradient(120deg,#e5eee7,#f8f7ef);min-height:410px}.eyebrow{color:#42735a;letter-spacing:.1em;font-size:13px;font-weight:700}.hero h1{font-size:clamp(34px,5vw,66px);line-height:1.18;max-width:750px;margin:18px 0}.hero>p:not(.eyebrow){max-width:650px;line-height:1.8;color:#58665f}.market{display:inline-block;background:white;border:1px solid #dbe3dd;border-radius:12px;padding:13px 18px;margin-top:24px}.content{padding:65px clamp(20px,9vw,140px);min-height:250px}.content h2{font-size:28px}.content p{line-height:1.8;color:#536159}.notice{font-size:13px}footer{padding:25px;text-align:center;color:#65716a;border-top:1px solid #e5eae6}@media(max-width:650px){.header{align-items:flex-start;flex-direction:column}.header nav{width:100%}.header label{flex:1}.header select{width:100%}.hero{min-height:350px}}
2 -
3 -.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px;margin-top:28px}.product{background:#fff;border:1px solid #e0e7e2;border-radius:15px;padding:16px;min-height:160px;overflow:hidden}.product img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:10px;background:#f4f6f3}.product h3{font-size:16px;line-height:1.6;margin:16px 0 0}
1 +:root {
2 + font-family: Inter, "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
3 + color: #142722;
4 + background: #f7f6f1;
5 + font-synthesis: none;
6 + -webkit-font-smoothing: antialiased;
7 +}
8 +* { box-sizing: border-box; }
9 +html { scroll-behavior: smooth; }
10 +body { margin: 0; min-width: 320px; }
11 +button, input, select { font: inherit; }
12 +button { cursor: pointer; }
13 +button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
14 + outline: 3px solid #b5ca66; outline-offset: 3px;
15 +}
16 +a { color: inherit; text-decoration: none; }
17 +.app-shell { width: 100%; overflow: hidden; }
18 +.preview-strip {
19 + background: #143d33; color: #e9f2e4; text-align: center; font-size: 11px;
20 + font-weight: 650; letter-spacing: .015em; min-height: 31px; padding: 8px 14px;
21 +}
22 +.live-dot { display: inline-block; width: 6px; height: 6px; background: #c4e28a; border-radius: 50%; margin-inline-end: 8px; vertical-align: 2px; }
23 +.header {
24 + min-height: 102px; display: flex; align-items: center; justify-content: space-between;
25 + gap: 25px; background: #fbfaf7; padding: 16px clamp(20px, 5.5vw, 100px);
26 + border-bottom: 1px solid #e9e9e1;
27 +}
28 +.logo { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; direction: ltr; }
29 +.logo-mark {
30 + display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
31 + background: #18463b; color: #f7f4e8; font-size: 24px; font-weight: 850;
32 + box-shadow: 0 8px 18px #18463b24;
33 +}
34 +.logo-text { font-size: 19px; line-height: 1.15; font-weight: 840; letter-spacing: -.05em; }
35 +.logo-text small { display: block; margin-top: 5px; font-weight: 600; letter-spacing: .26em; font-size: 8px; }
36 +.header-nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(12px, 2.5vw, 34px); }
37 +.nav-catalog { color: #445c54; font-size: 13px; font-weight: 690; white-space: nowrap; }
38 +.nav-catalog:hover { color: #154b3b; }
39 +.nav-select { color: #65736d; font-size: 10px; font-weight: 700; }
40 +.nav-select select {
41 + display: block; margin-top: 5px; width: 124px; min-height: 37px;
42 + border: 1px solid #dfe4db; border-radius: 9px;
43 + padding: 6px 10px; color: #16362a; background: #fff; font-size: 12px; font-weight: 650;
44 +}
45 +.hero {
46 + min-height: 595px; display: grid; grid-template-columns: minmax(0, 1.09fr) minmax(0, .91fr);
47 + align-items: stretch; background: #f2f0e7;
48 +}
49 +.hero-copy { padding: clamp(50px, 7.5vw, 115px) clamp(22px, 6vw, 110px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
50 +.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 10px; color: #55724a; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
51 +.eyebrow-line { display: inline-block; width: 22px; height: 2px; background: #88aa6a; }
52 +.hero h1 { font-weight: 825; font-size: clamp(43px, 5.2vw, 83px); line-height: 1.2; letter-spacing: -.065em; margin: 24px 0 20px; }
53 +.hero h1 em { color: #407966; font-style: normal; }
54 +.hero-copy > p { color: #526159; font-size: clamp(14px, 1.2vw, 16px); max-width: 530px; line-height: 2.05; margin: 0; }
55 +.hero-actions { display: flex; align-items: center; gap: 17px; margin-top: 32px; flex-wrap: wrap; }
56 +.primary-action {
57 + display: inline-flex; gap: 22px; align-items: center; justify-content: center; border-radius: 12px;
58 + background: #194839; padding: 15px 23px; color: white; font-size: 13px; font-weight: 760;
59 + box-shadow: 0 14px 30px #19483928; transition: transform .18s, background .18s;
60 +}
61 +.primary-action:hover { background: #2a624d; transform: translateY(-2px); }
62 +.primary-action span { direction: ltr; }
63 +.hero-note { color: #7b827a; font-size: 11px; }
64 +.market-pill {
65 + display: flex; gap: 10px; align-items: center; background: #fff9; border: 1px solid #dadfd5;
66 + padding: 12px 15px; border-radius: 10px; margin-top: 32px; font-size: 12px; color: #5d6a61;
67 +}
68 +.market-pill strong { color: #1b3b30; }
69 +.market-pill-icon { font-size: 18px; color: #518868; }
70 +.currency { display: inline-block; direction: ltr; font-size: 10px; padding: 5px 8px; border-radius: 6px; background: #e7ebdf; color: #28513f; font-weight: 800; letter-spacing: .08em; }
71 +.hero-art {
72 + position: relative; min-height: 480px; display: grid; place-items: center; isolation: isolate;
73 + background: radial-gradient(circle at 45% 46%, #466d52 0, #245343 49%, #163e33 100%); overflow: hidden;
74 +}
75 +.hero-ring { position: absolute; aspect-ratio: 1; border-radius: 50%; border: 1px solid #d1e0c442; }
76 +.hero-ring-one { width: 63%; } .hero-ring-two { width: 89%; border-color: #d1e0c420; }
77 +.hero-art::before, .hero-art::after { content: ""; position: absolute; border-radius: 50%; }
78 +.hero-art::before { width: 115px; height: 115px; background: #dcd1a6; opacity: .19; top: 15%; inset-inline-start: 13%; filter: blur(4px); }
79 +.hero-art::after { width: 155px; height: 155px; background: #d1e9bc; opacity: .10; bottom: 11%; inset-inline-end: 9%; }
80 +.hero-figure {
81 + position: relative; width: min(45%, 260px); height: 340px; z-index: 1;
82 + filter: drop-shadow(25px 30px 18px #0b2b24a6);
83 + transform: rotate(-9deg); animation: float 7s ease-in-out infinite;
84 +}
85 +.figure-top {
86 + height: 56px; margin: 0 auto; width: 48%; border-radius: 50% 50% 12px 12px;
87 + background: linear-gradient(115deg, #ded4ad, #fff4d1 47%, #a59876); border: 5px solid #b9ab83;
88 +}
89 +.figure-center {
90 + height: 230px; border-radius: 41% 41% 32% 32% / 14% 14% 25% 25%;
91 + background: linear-gradient(103deg, #9c957d 0%, #e2d5b1 19%, #fff6d9 46%, #d1ba8e 78%, #a79970 100%);
92 + box-shadow: inset -19px 0 28px #7d725046, inset 22px 0 27px #fff6e172;
93 + margin-top: -3px; overflow: hidden;
94 +}
95 +.figure-center::after { content: ""; display: block; height: 100px; width: 100%; border-top: 2px solid #b99e71; border-bottom: 2px solid #b99e71; margin-top: 72px; background: repeating-linear-gradient(130deg, transparent 0 18px, #a8997750 20px 22px); }
96 +.figure-bottom { height: 29px; width: 67%; background: linear-gradient(90deg, #b9a57a, #ffedc2, #afa075); border-radius: 0 0 42px 42px; margin: -7px auto 0; }
97 +.hero-art-caption, .hero-art-index { position: absolute; z-index: 3; color: #e3e9d0a8; letter-spacing: .23em; font-size: 10px; font-weight: 650; }
98 +.hero-art-caption { bottom: 33px; inset-inline-start: 33px; }
99 +.hero-art-index { top: 35px; inset-inline-end: 34px; }
100 +.feature-band {
101 + min-height: 125px; display: grid; grid-template-columns: repeat(3, 1fr);
102 + align-items: center; background: #fffefa; border-bottom: 1px solid #e8e9e1;
103 + padding: 18px clamp(15px, 5.5vw, 100px);
104 +}
105 +.feature-band > div { display: flex; align-items: center; justify-content: center; gap: 16px; border-inline-end: 1px solid #e2e7dd; }
106 +.feature-band > div:last-child { border-inline-end: 0; }
107 +.feature-band strong { font-size: clamp(19px, 2.5vw, 31px); font-weight: 840; direction: ltr; }
108 +.feature-band span { font-size: 11px; color: #758079; font-weight: 650; }
109 +.content { padding: clamp(55px, 7vw, 110px) clamp(20px, 5.5vw, 100px) 100px; max-width: 1600px; margin: 0 auto; }
110 +.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
111 +.section-heading h2, .closing h2 { font-size: clamp(29px, 3.2vw, 43px); letter-spacing: -.04em; line-height: 1.4; margin: 12px 0; }
112 +.section-heading p { color: #65746b; font-size: 13px; line-height: 1.95; margin: 0; }
113 +.demo-badge { background: #e8e9d5; color: #4f5937; padding: 9px 12px; border-radius: 8px; font-size: 10px; font-weight: 800; white-space: nowrap; letter-spacing: .025em; }
114 +.catalog-toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 38px 0 20px; flex-wrap: wrap; }
115 +.filters { display: flex; flex-wrap: wrap; gap: 9px; }
116 +.filter {
117 + background: transparent; color: #5f6f62; border: 1px solid #dcded6; border-radius: 9px;
118 + font-size: 12px; font-weight: 720; padding: 12px 18px; min-height: 43px; transition: .2s;
119 +}
120 +.filter:hover { border-color: #668d77; color: #1a503b; }
121 +.filter.active { background: #1e4d3e; color: white; border-color: #1e4d3e; }
122 +.search-field { border: 1px solid #dcded6; border-radius: 9px; display: flex; align-items: center; background: #fff; gap: 7px; padding: 0 12px; min-height: 44px; min-width: min(100%, 250px); }
123 +.search-field span { color: #5b7466; font-size: 24px; line-height: 1; }
124 +.search-field input { border: 0; outline: 0; background: transparent; font-size: 12px; color: #244435; min-width: 0; width: 100%; }
125 +.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(13px, 2vw, 25px); }
126 +.product { background: #fff; border: 1px solid #e9e9e2; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 26px #22382d05; transition: transform .2s, box-shadow .2s; }
127 +.product:hover { transform: translateY(-4px); box-shadow: 0 18px 35px #20392f13; }
128 +.product-open { border: 0; padding: 0; width: 100%; height: 100%; background: transparent; color: inherit; text-align: start; }
129 +.artwork { position: relative; min-height: 235px; overflow: hidden; display: grid; place-items: center; background: #f4eee1; color: #906e4e; isolation: isolate; }
130 +.artwork-orbit { position: absolute; border-radius: 50%; border: 1px solid #fff8; width: 70%; aspect-ratio: 1; }
131 +.artwork svg { z-index: 1; width: 77%; max-height: 175px; filter: drop-shadow(5px 12px 5px #4a322f22); }
132 +.art-phone { background: linear-gradient(133deg, #ded5c2, #f1eadc); color: #6f6b6b; }
133 +.art-laptop { background: linear-gradient(135deg, #d7e5da, #ebf1e7); color: #59816d; }
134 +.art-headphones { background: linear-gradient(135deg, #eddbce, #fcf1e4); color: #ad6d53; }
135 +.art-camera { background: linear-gradient(135deg, #dbdde2, #f2f1ec); color: #607183; }
136 +.art-tea { background: linear-gradient(135deg, #e7e7c8, #f6eedc); color: #76864c; }
137 +.art-ceramic { background: linear-gradient(135deg, #dfdbcf, #f4eadd); color: #9a795f; }
138 +.art-textile { background: linear-gradient(135deg, #d8e1db, #edeae1); color: #638a72; }
139 +.art-saffron { background: linear-gradient(135deg, #f4e8cc, #fce5cf); color: #b98639; }
140 +.product-copy { padding: 21px 20px 23px; }
141 +.product-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #678073; font-weight: 740; }
142 +.product-meta > span:last-child { direction: ltr; }
143 +.product-copy h3 { font-size: 17px; font-weight: 790; margin: 10px 0 6px; line-height: 1.55; }
144 +.product-copy > p { color: #8a938b; font-size: 11px; min-height: 35px; line-height: 1.65; margin: 0; }
145 +.product-link { display: inline-flex; gap: 9px; align-items: center; font-weight: 750; font-size: 11px; margin-top: 20px; color: #2e7459; }
146 +.product-link span { direction: ltr; }
147 +.real-product-image { display: grid; place-items: center; aspect-ratio: 1.4; background: #eceee8; color: #537767; font-size: 50px; }
148 +.real-product-image img { width: 100%; height: 100%; object-fit: contain; }
149 +.catalog-alert { background: #eff0e3; border: 1px solid #dfe1cd; border-radius: 10px; padding: 13px 17px; font-size: 12px; color: #666e48; line-height: 1.8; }
150 +.empty-state { padding: 45px 20px; text-align: center; border: 1px dashed #cdd8cb; border-radius: 12px; color: #607668; font-size: 13px; }
151 +.closing { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: clamp(44px, 6vw, 92px) clamp(22px, 5.5vw, 100px); background: #e6eddf; }
152 +.closing > * { flex: 1; }
153 +.closing p { color: #576e5f; line-height: 2; max-width: 475px; font-size: 14px; }
154 +footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 26px clamp(22px, 5.5vw, 100px); background: #173e32; color: #e0e6de; font-size: 12px; }
155 +footer span:first-child { font-weight: 820; letter-spacing: .09em; direction: ltr; }
156 +footer span small { opacity: .65; font-weight: 500; }
157 +footer span:last-child { opacity: .7; font-size: 11px; }
158 +.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: #0d2a23b8; padding: 16px; display: grid; place-items: center; }
159 +.product-modal { width: min(100%, 760px); max-height: min(88vh, 800px); background: #fffefa; border-radius: 18px; position: relative; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 45px 100px #091d1a55; }
160 +.product-modal .artwork { min-height: 350px; }
161 +.modal-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 42px 30px; }
162 +.modal-copy h2 { font-size: clamp(25px, 3vw, 33px); margin: 22px 0 10px; }
163 +.modal-copy p { color: #66766a; line-height: 1.95; font-size: 13px; }
164 +.modal-note { background: #f2f2e9; border-radius: 10px; padding: 12px; }
165 +.modal-close { position: absolute; z-index: 2; top: 14px; inset-inline-end: 14px; display: grid; place-items: center; width: 35px; height: 35px; font-size: 24px; color: #23513e; background: #fffffff0; border: 0; border-radius: 50%; }
166 +.modal-done { background: #24503e; color: white; padding: 13px 16px; border: 0; border-radius: 9px; font-size: 12px; font-weight: 730; margin-top: 15px; }
167 +@keyframes float { 50% { transform: translateY(-13px) rotate(-7deg); } }
168 +@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto!important; animation: none!important; transition: none!important; } }
169 +@media (max-width: 1100px) {
170 + .hero { grid-template-columns: 1fr 0.85fr; }
171 + .hero-copy { padding: 50px 28px; }
172 + .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
173 + .hero-figure { height: 300px; }
174 + .figure-center { height: 195px; }
175 +}
176 +@media (max-width: 760px) {
177 + .header { flex-direction: column; align-items: stretch; padding: 19px 19px 21px; gap: 16px; }
178 + .header-nav { justify-content: space-between; gap: 10px; }
179 + .nav-catalog { display: none; }
180 + .nav-select { flex: 1; min-width: 0; }
181 + .nav-select select { width: 100%; }
182 + .hero { grid-template-columns: 1fr; }
183 + .hero-copy { padding: 58px 23px 54px; }
184 + .hero h1 { font-size: clamp(42px, 9vw, 62px); }
185 + .hero-art { min-height: 340px; }
186 + .hero-figure { width: 170px; height: 250px; }
187 + .figure-center { height: 164px; }
188 + .figure-top { height: 42px; }
189 + .figure-bottom { height: 23px; }
190 + .hero-art-caption { bottom: 24px; }
191 + .feature-band { gap: 7px; min-height: 92px; }
192 + .feature-band > div { flex-direction: column; gap: 5px; text-align: center; }
193 + .feature-band span { font-size: 9px; }
194 + .content { padding: 55px 20px 70px; }
195 + .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
196 + .section-heading { flex-direction: column; gap: 16px; }
197 + .catalog-toolbar { align-items: stretch; }
198 + .search-field { flex: 1; }
199 + .closing { flex-direction: column; align-items: stretch; gap: 10px; }
200 + footer { flex-direction: column; text-align: center; }
201 +}
202 +@media (max-width: 420px) {
203 + .preview-strip { font-size: 10px; }
204 + .hero-actions { gap: 12px; }
205 + .hero-note { font-size: 10px; }
206 + .filters { gap: 7px; }
207 + .filter { padding: 11px 12px; font-size: 11px; }
208 + .product-grid { gap: 12px; }
209 + .artwork { min-height: 150px; }
210 + .artwork svg { width: 83%; }
211 + .product-copy { padding: 15px 12px 18px; }
212 + .product-copy h3 { font-size: 14px; }
213 + .product-copy > p { font-size: 10px; }
214 + .product-meta { font-size: 9px; }
215 + .product-link { font-size: 10px; }
216 + .product-modal { grid-template-columns: 1fr; }
217 + .product-modal .artwork { min-height: 195px; }
218 + .modal-copy { padding: 24px; }
219 +}