.form-group {
    margin-bottom: 20px;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Add styles for the form row layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

/* Inline label styles for recipient and occasion */
.form-row .form-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
}

.form-row .form-group label {
    font-weight: 600;
    color: #2c5282;
    white-space: nowrap;
    align-self: center;
    margin-bottom: 0;
    line-height: 1.2;
    font-size: 0.95rem;
}

.form-row .form-group select {
    flex: 1;
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
}

/* Regular label styles for other form groups */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c5282;
    font-size: 0.95rem;
}

select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

select:focus, textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    background-color: #fff;
}

textarea {
    height: 100px;
    resize: vertical;
}

/* Special handling for interests group */
.interests-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    column-gap: 8px;
    margin-top: 10px;
    padding: 5px;
}

.interests-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.interests-group label:hover {
    background: #edf2f7;
}

.interests-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

/* Special handling for anything else textarea */
.form-group:has(textarea) {
    display: block;
}

.form-group:has(textarea) label {
    display: block;
    margin-bottom: 8px;
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

button {
    background-color: #007BFF;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

button:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.reset-button {
    background-color: #718096;
}

.reset-button:hover {
    background-color: #4a5568;
}

#results {
    margin-top: 30px;
    text-align: left;
}

.product-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-card h3 {
    margin: 0 0 10px 0;
    color: #2c5282;
    font-size: 20px;
}

.product-card p {
    margin: 0 0 15px 0;
    color: #4a5568;
    line-height: 1.5;
}

.product-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f8f8f8;
}

.product-grid::-webkit-scrollbar {
    height: 8px;
}

.product-grid::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

.product-item {
    flex: 0 0 300px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f8f8;
    padding: 10px;
}

.product-details {
    padding: 15px;
}

.product-details h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price {
    font-weight: bold;
    color: #2c5282;
    margin-bottom: 5px;
}

.merchant {
    color: #666;
    font-size: 14px;
}

.load-products {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 0;
    transition: background-color 0.2s;
}

.load-products:hover {
    background-color: #e0e0e0;
}

.load-products:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.no-products {
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .form-row .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px;
    }
    .form-row .form-group label {
        margin-bottom: 5px;
    }
    .form-row .form-group select {
        width: 100%;
    }
    .product-grid {
        gap: 12px;
        padding-right: 12px;
    }
    .product-item {
        flex: 0 0 calc(100% - 30px);
    }
}

.loading {
    display: none;
    margin: 20px 0;
    text-align: center;
    color: #666;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    display: none;
    color: #dc3545;
    margin: 10px 0;
} 