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