Spaces:
Paused
Paused
File size: 4,363 Bytes
633afe9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | /* ===================== COMPACT E-COMMERCE LAYOUT ===================== */
/* Reduce main container padding */
.block-container {
padding-top: 1rem !important;
padding-bottom: 1rem !important;
max-width: 100% !important;
}
/* Header styles */
.main-header {
text-align: center;
margin-bottom: 0.5rem;
}
.main-header h1 {
margin-bottom: 0;
font-size: 1.8rem;
}
.main-header p {
color: #888;
margin-top: 0;
font-size: 0.9rem;
}
/* Compact buttons */
.stButton > button {
border-radius: 8px;
padding: 8px 16px;
font-weight: 600;
font-size: 0.9rem;
}
.stButton > button[kind="primary"] {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
/* Form elements - ensure text is visible */
.stSelectbox [data-baseweb="select"] {
min-height: 44px !important;
height: auto !important;
}
.stSelectbox [data-baseweb="select"] > div {
min-height: 44px !important;
height: auto !important;
display: flex !important;
align-items: center !important;
padding: 0 12px !important;
}
.stSelectbox [data-baseweb="select"] > div > div {
height: auto !important;
line-height: normal !important;
padding: 10px 0 !important;
}
/* Fix for the selected value text */
[data-baseweb="select"] [data-testid="stMarkdownContainer"],
[data-baseweb="select"] span,
[data-baseweb="select"] div[class*="valueContainer"] {
overflow: visible !important;
text-overflow: unset !important;
white-space: nowrap !important;
line-height: normal !important;
height: auto !important;
}
.stTextInput > div > div > input {
min-height: 44px !important;
padding: 8px 12px !important;
font-size: 0.95rem !important;
}
/* Product grid - compact cards */
[data-testid="stVerticalBlock"] > [data-testid="stVerticalBlockBorderWrapper"] {
border-radius: 10px;
overflow: hidden;
}
/* Product card container */
.stContainer {
padding: 0 !important;
}
/* Product images */
[data-testid="stImage"] {
border-radius: 8px 8px 0 0;
overflow: hidden;
}
[data-testid="stImage"] img {
object-fit: cover;
aspect-ratio: 1;
}
/* Product title */
.stMarkdown p strong {
font-size: 0.85rem;
line-height: 1.3;
display: block;
margin: 8px 0 4px 0;
}
/* Caption (match score) */
.stCaption {
font-size: 0.75rem !important;
margin: 0 !important;
padding-bottom: 8px !important;
}
/* Info boxes (prediction banners) */
[data-testid="stAlert"] {
padding: 10px 15px !important;
margin: 10px 0 !important;
border-radius: 8px !important;
}
/* Horizontal divider */
hr {
margin: 10px 0 !important;
border-color: rgba(255, 255, 255, 0.1) !important;
}
/* File uploader - compact */
[data-testid="stFileUploader"] {
padding: 0 !important;
}
[data-testid="stFileUploader"] section {
padding: 10px !important;
}
[data-testid="stFileUploader"] small {
display: none;
}
/* Audio input - compact */
[data-testid="stAudioInput"] {
padding: 0 !important;
}
/* Radio buttons - compact horizontal */
[data-testid="stRadio"] > div {
gap: 10px !important;
}
[data-testid="stRadio"] label {
padding: 6px 12px !important;
font-size: 0.85rem !important;
}
/* Empty state */
.empty-state {
text-align: center;
padding: 40px;
color: #888;
}
.empty-state h3 {
margin-bottom: 10px;
font-size: 1.2rem;
}
.empty-state p {
font-size: 0.9rem;
}
/* Column gaps - tighter */
[data-testid="column"] {
padding: 0 5px !important;
}
/* Product detail view */
.product-detail-price {
margin: 15px 0;
}
.product-detail-price .old-price {
text-decoration: line-through;
color: #888;
font-size: 1.2rem;
}
.product-detail-price .current-price {
color: #2ecc71;
font-size: 2rem;
font-weight: bold;
margin-left: 10px;
}
.product-detail-price .discount-badge {
background: #e74c3c;
color: white;
padding: 4px 10px;
border-radius: 5px;
margin-left: 10px;
font-size: 0.9rem;
}
/* View details button - smaller */
.stButton > button[kind="secondary"] {
font-size: 0.8rem !important;
padding: 5px 10px !important;
}
/* Hide streamlit branding */
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {visibility: hidden;}
/* Spinner */
.stSpinner > div {
border-color: #667eea !important;
}
|