body {
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    margin: 0;
    padding: 0;
}

#container {
    max-width: 600px;
    margin: 30px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    padding: 20px;
}

h1 {
    text-align: center;
}

.chat-box {
    height: 400px;
    overflow-y: scroll;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
    background: #fafafa;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    max-width: 80%;
    line-height: 1.4;
}

.message.user {
    background: #e0f7fa;
    align-self: flex-end;
    text-align: right;
    margin-left: auto;
}

.message.bot {
    background-color: #e7f1ff;  /* Soft blue */
    color: #204d74;
    border-radius: 10px;
    padding: 8px 14px;
    margin: 6px 0;
}


.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-area input {
    flex-grow: 1;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.input-area button {
    padding: 10px 20px;
    font-size: 1em;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.upload-area {
    margin-top: 10px;
    text-align: center;
}

#input-hint {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 12px;
    margin-left: 5px;
}

.rug-cards {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 8px 0 8px 0;
    margin: 16px 0 12px 0;
    scroll-snap-type: x mandatory;
}

.rug-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.09);
    width: 100%;
    max-width: 320px;         /* ↑ bigger cards for larger screens */
    min-width: 0;             /* let it shrink on small screens */
    padding: 10px 10px 14px 10px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-align: start;
    margin-bottom: 10px;
    margin-right: 10px;        /* if you use horizontal scroll */
}
.rug-card img {
    width: 100%;
    height: auto;             /* Let height auto-scale */
    aspect-ratio: 4/3;        /* Keeps images same shape */
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    background: #eee;         /* Shows gray background while loading */
}
.rug-title {
    font-size: 1.08em;
    font-weight: 600;
    margin-bottom: 2px;
    text-align: center;
}
.rug-style {
    font-size: 0.98em;
    color: #888;
    margin-bottom: 2px;
    text-align: center;
}
.rug-price {
    font-size: 1.07em;
    color: #2870c4;
    margin-bottom: 5px;
    font-weight: 600;
    text-align: center;
}
.reasons {
    padding-left: 18px;
    margin: 4px 0 0 0;
    font-size: 0.92em;
    color: #6d5;
    list-style: disc;
}
