| 1 |
/* Cards Styles */ |
| 2 |
.aibui-cards { |
| 3 |
margin: 20px 0; |
| 4 |
} |
| 5 |
|
| 6 |
.aibui-cards-container { |
| 7 |
display: grid; |
| 8 |
gap: 20px; |
| 9 |
max-width: 1200px; |
| 10 |
margin: 0 auto; |
| 11 |
padding: 0 20px; |
| 12 |
width: 100%; |
| 13 |
box-sizing: border-box; |
| 14 |
} |
| 15 |
|
| 16 |
.aibui-single-card { |
| 17 |
background-color: #ffffff; |
| 18 |
border-radius: 12px; |
| 19 |
padding: 20px; |
| 20 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); |
| 21 |
border: 1px solid #e5e7eb; |
| 22 |
position: relative; |
| 23 |
transition: transform 0.2s ease, box-shadow 0.2s ease; |
| 24 |
display: flex; |
| 25 |
flex-direction: column; |
| 26 |
width: 100%; |
| 27 |
box-sizing: border-box; |
| 28 |
overflow: hidden; |
| 29 |
} |
| 30 |
|
| 31 |
.aibui-single-card:hover { |
| 32 |
transform: translateY(-2px); |
| 33 |
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); |
| 34 |
} |
| 35 |
|
| 36 |
/* Card Badge */ |
| 37 |
.aibui-card-badge { |
| 38 |
position: absolute; |
| 39 |
top: 12px; |
| 40 |
right: 12px; |
| 41 |
padding: 4px 8px; |
| 42 |
border-radius: 4px; |
| 43 |
font-size: 12px; |
| 44 |
font-weight: 600; |
| 45 |
text-transform: uppercase; |
| 46 |
color: #ffffff; |
| 47 |
z-index: 2; |
| 48 |
} |
| 49 |
|
| 50 |
/* Card Image */ |
| 51 |
.aibui-card-image { |
| 52 |
width: 100%; |
| 53 |
height: 200px; |
| 54 |
background-size: cover; |
| 55 |
background-position: center; |
| 56 |
border-radius: 8px; |
| 57 |
margin-bottom: 16px; |
| 58 |
overflow: hidden; |
| 59 |
} |
| 60 |
|
| 61 |
.aibui-card-image img { |
| 62 |
width: 100%; |
| 63 |
height: 100%; |
| 64 |
object-fit: cover; |
| 65 |
} |
| 66 |
|
| 67 |
/* Card Content */ |
| 68 |
.aibui-card-title { |
| 69 |
font-size: 18px; |
| 70 |
font-weight: 600; |
| 71 |
margin: 0 0 8px 0; |
| 72 |
color: #111827; |
| 73 |
line-height: 1.4; |
| 74 |
} |
| 75 |
|
| 76 |
.aibui-card-description { |
| 77 |
font-size: 14px; |
| 78 |
color: #6b7280; |
| 79 |
margin: 0 0 16px 0; |
| 80 |
line-height: 1.5; |
| 81 |
flex-grow: 1; |
| 82 |
} |
| 83 |
|
| 84 |
/* Card Pricing */ |
| 85 |
.aibui-card-pricing { |
| 86 |
display: flex; |
| 87 |
align-items: center; |
| 88 |
gap: 8px; |
| 89 |
margin-bottom: 16px; |
| 90 |
} |
| 91 |
|
| 92 |
.aibui-card-price { |
| 93 |
font-size: 20px; |
| 94 |
font-weight: 700; |
| 95 |
color: #111827; |
| 96 |
} |
| 97 |
|
| 98 |
.aibui-card-original-price { |
| 99 |
font-size: 14px; |
| 100 |
color: #9ca3af; |
| 101 |
text-decoration: line-through; |
| 102 |
} |
| 103 |
|
| 104 |
/* Card Button */ |
| 105 |
.aibui-card-button { |
| 106 |
width: 100%; |
| 107 |
padding: 12px 16px; |
| 108 |
border-radius: 8px; |
| 109 |
border: none; |
| 110 |
font-size: 14px; |
| 111 |
font-weight: 600; |
| 112 |
cursor: pointer; |
| 113 |
transition: all 0.2s ease; |
| 114 |
text-decoration: none; |
| 115 |
text-align: center; |
| 116 |
display: block; |
| 117 |
box-sizing: border-box; |
| 118 |
overflow: hidden; |
| 119 |
white-space: nowrap; |
| 120 |
text-overflow: ellipsis; |
| 121 |
} |
| 122 |
|
| 123 |
.aibui-card-button:hover { |
| 124 |
opacity: 0.9; |
| 125 |
transform: translateY(-1px); |
| 126 |
} |
| 127 |
|
| 128 |
.aibui-card-button:active { |
| 129 |
transform: translateY(0); |
| 130 |
} |
| 131 |
|
| 132 |
/* Responsive Design */ |
| 133 |
@media (max-width: 1024px) { |
| 134 |
.aibui-cards-container { |
| 135 |
grid-template-columns: repeat(2, 1fr) !important; |
| 136 |
} |
| 137 |
} |
| 138 |
|
| 139 |
@media (max-width: 768px) { |
| 140 |
.aibui-cards-container { |
| 141 |
grid-template-columns: 1fr !important; |
| 142 |
padding: 0 15px; |
| 143 |
gap: 15px; |
| 144 |
} |
| 145 |
|
| 146 |
.aibui-single-card { |
| 147 |
padding: 16px; |
| 148 |
} |
| 149 |
|
| 150 |
.aibui-card-image { |
| 151 |
height: 180px; |
| 152 |
} |
| 153 |
|
| 154 |
.aibui-card-title { |
| 155 |
font-size: 16px; |
| 156 |
} |
| 157 |
|
| 158 |
.aibui-card-price { |
| 159 |
font-size: 18px; |
| 160 |
} |
| 161 |
} |
| 162 |
|
| 163 |
@media (max-width: 480px) { |
| 164 |
.aibui-cards-container { |
| 165 |
padding: 0 10px; |
| 166 |
} |
| 167 |
|
| 168 |
.aibui-single-card { |
| 169 |
padding: 12px; |
| 170 |
} |
| 171 |
|
| 172 |
.aibui-card-image { |
| 173 |
height: 160px; |
| 174 |
margin-bottom: 12px; |
| 175 |
} |
| 176 |
|
| 177 |
.aibui-card-title { |
| 178 |
font-size: 15px; |
| 179 |
margin-bottom: 6px; |
| 180 |
} |
| 181 |
|
| 182 |
.aibui-card-description { |
| 183 |
font-size: 13px; |
| 184 |
margin-bottom: 12px; |
| 185 |
} |
| 186 |
|
| 187 |
.aibui-card-pricing { |
| 188 |
margin-bottom: 12px; |
| 189 |
} |
| 190 |
|
| 191 |
.aibui-card-price { |
| 192 |
font-size: 16px; |
| 193 |
} |
| 194 |
|
| 195 |
.aibui-card-button { |
| 196 |
padding: 10px 12px; |
| 197 |
font-size: 13px; |
| 198 |
} |
| 199 |
} |
| 200 |
|
| 201 |
/* Editor specific styles */ |
| 202 |
.editor-styles-wrapper .aibui-cards-container { |
| 203 |
padding: 0; |
| 204 |
} |
| 205 |
|
| 206 |
.editor-styles-wrapper .aibui-single-card { |
| 207 |
background-color: #ffffff; |
| 208 |
border: 1px solid #e5e7eb; |
| 209 |
} |
| 210 |
|
| 211 |
/* Grid variations */ |
| 212 |
.aibui-cards-container[style*="grid-template-columns: repeat(1, 1fr)"] { |
| 213 |
grid-template-columns: 1fr !important; |
| 214 |
} |
| 215 |
|
| 216 |
.aibui-cards-container[style*="grid-template-columns: repeat(2, 1fr)"] { |
| 217 |
grid-template-columns: repeat(2, 1fr) !important; |
| 218 |
} |
| 219 |
|
| 220 |
.aibui-cards-container[style*="grid-template-columns: repeat(3, 1fr)"] { |
| 221 |
grid-template-columns: repeat(3, 1fr) !important; |
| 222 |
} |
| 223 |
|
| 224 |
.aibui-cards-container[style*="grid-template-columns: repeat(4, 1fr)"] { |
| 225 |
grid-template-columns: repeat(4, 1fr) !important; |
| 226 |
} |
| 227 |
|
| 228 |
/* Hover effects for better UX */ |
| 229 |
.aibui-single-card:hover .aibui-card-button { |
| 230 |
transform: translateY(-1px); |
| 231 |
} |
| 232 |
|
| 233 |
/* Focus states for accessibility */ |
| 234 |
.aibui-card-button:focus { |
| 235 |
outline: 2px solid #4f46e5; |
| 236 |
outline-offset: 2px; |
| 237 |
} |
| 238 |
|
| 239 |
/* Loading state for images */ |
| 240 |
.aibui-card-image:empty { |
| 241 |
background-color: #f3f4f6; |
| 242 |
display: flex; |
| 243 |
align-items: center; |
| 244 |
justify-content: center; |
| 245 |
color: #9ca3af; |
| 246 |
font-size: 14px; |
| 247 |
} |
| 248 |
|
| 249 |
.aibui-card-image:empty::before { |
| 250 |
content: "No image"; |
| 251 |
} |
| 252 |
|
| 253 |
/* Hide "No image" text when background image is present */ |
| 254 |
.aibui-card-image[style*="background-image"]::before { |
| 255 |
display: none; |
| 256 |
} |
| 257 |
|